Skip to content

Commit

Permalink
feat: check for nullptr in executeDefered
Browse files Browse the repository at this point in the history
  • Loading branch information
0ax1 committed Sep 10, 2023
1 parent 019afea commit fedb0e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/detail/vst3/os/linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void LinuxHelper::executeDefered()
{
for (auto p : _plugs)
{
p->onIdle();
if (p) p->onIdle();
}
}
void LinuxHelper::attach(IPlugObject* plugobject)
Expand Down
2 changes: 1 addition & 1 deletion src/detail/vst3/os/macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void log(const char* text)
{
for (auto p : _plugs)
{
p->onIdle();
if (p) p->onIdle();
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/detail/vst3/os/windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ void WindowsHelper::terminate()

void WindowsHelper::executeDefered()
{
for (auto&& p : _plugs) p->onIdle();
for (auto&& p : _plugs)
{
if (p) p->onIdle();
}
}

void WindowsHelper::attach(IPlugObject* plugobject)
Expand Down

0 comments on commit fedb0e3

Please sign in to comment.