From 051cd6e966c6efed1fd4a7fcde024f23d2f7fd4e Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 25 May 2022 00:10:01 -0500 Subject: [PATCH] fix another fucking IGFD crash bug --- extern/igfd/ImGuiFileDialog.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/extern/igfd/ImGuiFileDialog.cpp b/extern/igfd/ImGuiFileDialog.cpp index f4641e97..f7a2be5b 100644 --- a/extern/igfd/ImGuiFileDialog.cpp +++ b/extern/igfd/ImGuiFileDialog.cpp @@ -1220,6 +1220,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1249,6 +1251,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1283,6 +1287,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1298,6 +1304,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1319,6 +1327,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1334,6 +1344,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1355,6 +1367,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false; @@ -1370,6 +1384,8 @@ namespace IGFD std::sort(prFileList.begin(), prFileList.end(), [](const std::shared_ptr& a, const std::shared_ptr& b) -> bool { + if (a==NULL || b==NULL) + return false; if (!a.use_count() || !b.use_count()) return false;