diff options
author | Robin Gareus <robin@gareus.org> | 2014-11-18 21:59:04 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-11-18 21:59:04 +0100 |
commit | 7518c363e500c6265db24ba848a6bcafabd912e0 (patch) | |
tree | cc1b640580d080148e3c80108b9aacd9c0df73a3 /gtk2_ardour/linux_vst_gui_support.cc | |
parent | fe6e6e3f35dfad64c1e03fb005241f0652f38247 (diff) |
assert no null pointer dereference
Diffstat (limited to 'gtk2_ardour/linux_vst_gui_support.cc')
-rw-r--r-- | gtk2_ardour/linux_vst_gui_support.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/linux_vst_gui_support.cc b/gtk2_ardour/linux_vst_gui_support.cc index 5eaf485c75..65039f162d 100644 --- a/gtk2_ardour/linux_vst_gui_support.cc +++ b/gtk2_ardour/linux_vst_gui_support.cc @@ -27,6 +27,7 @@ #include <stdlib.h> #include <stdio.h> #include <libgen.h> +#include <assert.h> #include <pthread.h> #include <signal.h> @@ -772,6 +773,10 @@ vstfx_event_loop_remove_plugin (VSTState* vstfx) } } + // if this function is called, there must be + // at least one plugin in the linked list + assert(vstfx_first); + if (vstfx_first == vstfx) { vstfx_first = vstfx_first->next; } |