diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-14 01:44:28 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-14 03:20:51 -0400 |
| commit | 664bdcd29761844ba9558f9c5fd43949009424e3 (patch) | |
| tree | e68cb93a918ad144c4c463323bd966ac89741fe0 /view/sharedcache/core/Utility.cpp | |
| parent | bf64859f5aa261fa8db7bfdd9af4f67826ff4e5b (diff) | |
[SharedCache] Fix project folder comparison crash
Fixes https://github.com/Vector35/binaryninja-api/issues/6629
Diffstat (limited to 'view/sharedcache/core/Utility.cpp')
| -rw-r--r-- | view/sharedcache/core/Utility.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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<ProjectFolder> a, Ref<ProjectFolder> b) +{ + if (!a && !b) + return true; + if (a && b) + return a->GetId() == b->GetId(); + return false; +} |
