Skip to content

Commit

Permalink
Fix for free-audio#42
Browse files Browse the repository at this point in the history
Guard against null _plugin within PluginHost::setParentWindow
Follow error convention in source code

Tested arch: arm64
Confirm no longer crash
  • Loading branch information
NatureIsFrequency committed Feb 7, 2024
1 parent 7fe81f8 commit ae87444
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions host/plugin-host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ static clap_window makeClapWindow(WId window) {
void PluginHost::setParentWindow(WId parentWindow) {
checkForMainThread();

if(!_plugin)
{
std::cerr << "called with a null clap_plugin pointer!" << std::endl;
return;
}

if (!_plugin->canUseGui())
return;

Expand Down

0 comments on commit ae87444

Please sign in to comment.