From 23a29efa3a010e199d503a739176080216c257fc Mon Sep 17 00:00:00 2001 From: kamisori Date: Wed, 21 Feb 2024 11:30:25 +0100 Subject: [PATCH] fixed use after free --- ImFileDialog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ImFileDialog.cpp b/ImFileDialog.cpp index 53832d9..7be68a7 100644 --- a/ImFileDialog.cpp +++ b/ImFileDialog.cpp @@ -939,16 +939,16 @@ namespace ifd { m_clearIcons(); } - if (p.u8string() == "Quick Access") { + if (m_currentDirectory.u8string() == "Quick Access") { for (auto& node : m_treeCache) { - if (node->Path == p) + if (node->Path == m_currentDirectory) for (auto& c : node->Children) m_content.push_back(FileData(c->Path)); } } - else if (p.u8string() == "This PC") { + else if (m_currentDirectory.u8string() == "This PC") { for (auto& node : m_treeCache) { - if (node->Path == p) + if (node->Path == m_currentDirectory) for (auto& c : node->Children) m_content.push_back(FileData(c->Path)); }