diff options
| author | Mason Reed <mason@vector35.com> | 2024-10-25 15:08:02 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-10-25 15:08:02 -0400 |
| commit | 558f108cfeec69e9c987f53297740e8a85590f31 (patch) | |
| tree | cbc9fa007d30e2fc60f9c2e335c97ffd0c7d2943 /plugins/msvc_rtti/plugin.cpp | |
| parent | 0840b2860069cf8d1dac47066bfdc3526720de19 (diff) | |
Fix crash when opening new file
Thanks glenn
Diffstat (limited to 'plugins/msvc_rtti/plugin.cpp')
| -rw-r--r-- | plugins/msvc_rtti/plugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/msvc_rtti/plugin.cpp b/plugins/msvc_rtti/plugin.cpp index 1a4d25c0..03ece2b7 100644 --- a/plugins/msvc_rtti/plugin.cpp +++ b/plugins/msvc_rtti/plugin.cpp @@ -15,7 +15,10 @@ bool MetadataExists(Ref<BinaryView> view) void RTTIAnalysis(Ref<AnalysisContext> analysisContext) { auto view = analysisContext->GetBinaryView(); - auto platformName = view->GetDefaultPlatform()->GetName(); + auto platform = view->GetDefaultPlatform(); + if (!platform) + return; + auto platformName = platform->GetName(); // We currently only want to check for MSVC rtti on windows platforms if (platformName.find("window") == std::string::npos) return; @@ -38,7 +41,6 @@ void VFTAnalysis(Ref<AnalysisContext> analysisContext) vftBackgroundTask->Finish(); } - extern "C" { BN_DECLARE_CORE_ABI_VERSION |
