From 664bdcd29761844ba9558f9c5fd43949009424e3 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 14 Apr 2025 01:44:28 -0400 Subject: [SharedCache] Fix project folder comparison crash Fixes https://github.com/Vector35/binaryninja-api/issues/6629 --- view/sharedcache/core/Utility.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'view/sharedcache/core/Utility.cpp') diff --git a/view/sharedcache/core/Utility.cpp b/view/sharedcache/core/Utility.cpp index 583770e6..0cffc03e 100644 --- a/view/sharedcache/core/Utility.cpp +++ b/view/sharedcache/core/Utility.cpp @@ -136,3 +136,12 @@ std::string BaseFileName(const std::string& path) return path.substr(lastSlashPos + 1); return path; } + +bool IsSameFolder(Ref a, Ref b) +{ + if (!a && !b) + return true; + if (a && b) + return a->GetId() == b->GetId(); + return false; +} -- cgit v1.3.1