Skip to content

Commit

Permalink
Lv2 Fix invalid memory access if plugin did not load
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Oct 24, 2020
1 parent 5d0340f commit 7808e0b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/core/lv2/Lv2Proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,12 @@ void Lv2Proc::initPlugin()

void Lv2Proc::shutdownPlugin()
{
lilv_instance_deactivate(m_instance);
lilv_instance_free(m_instance);
m_instance = nullptr;
if (m_valid)
{
lilv_instance_deactivate(m_instance);
lilv_instance_free(m_instance);
m_instance = nullptr;
}
}


Expand Down

0 comments on commit 7808e0b

Please sign in to comment.