Skip to content

Commit

Permalink
[Mach-O] Fix an error on Free builds
Browse files Browse the repository at this point in the history
  • Loading branch information
0cyn authored and plafosse committed Jul 16, 2024
1 parent 2623732 commit a37d1dc
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions view/macho/machoview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1854,14 +1854,16 @@ bool MachoView::InitializeHeader(MachOHeader& header, bool isMainHeader, uint64_
}
if (parseObjCStructs)
{

if (!settings) // Add our defaults
{
Ref<Settings> programSettings = Settings::Instance();
if (programSettings->Get<bool>("corePlugins.workflows.objc"))
if (programSettings->Contains("corePlugins.workflows.objc"))
{
programSettings->Set("workflows.enable", true, this);
programSettings->Set("workflows.functionWorkflow", "core.function.objectiveC", this);
if (programSettings->Get<bool>("corePlugins.workflows.objc"))
{
programSettings->Set("workflows.enable", true, this);
programSettings->Set("workflows.functionWorkflow", "core.function.objectiveC", this);
}
}
}
}
Expand Down Expand Up @@ -3906,10 +3908,13 @@ Ref<Settings> MachoViewType::GetLoadSettingsForData(BinaryView* data)
"description" : "Processes Objective-C structures, applying method names and types from encoded metadata"
})");
Ref<Settings> programSettings = Settings::Instance();
if (programSettings->Get<bool>("corePlugins.workflows.objc"))
if (programSettings->Contains("corePlugins.workflows.objc"))
{
programSettings->Set("workflows.enable", true, viewRef);
programSettings->Set("workflows.functionWorkflow", "core.function.objectiveC", viewRef);
if (programSettings->Get<bool>("corePlugins.workflows.objc"))
{
programSettings->Set("workflows.enable", true, viewRef);
programSettings->Set("workflows.functionWorkflow", "core.function.objectiveC", viewRef);
}
}
}
if (viewRef->GetSectionByName("__cfstring"))
Expand Down

0 comments on commit a37d1dc

Please sign in to comment.