From 7518c363e500c6265db24ba848a6bcafabd912e0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 18 Nov 2014 21:59:04 +0100 Subject: assert no null pointer dereference --- gtk2_ardour/linux_vst_gui_support.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gtk2_ardour/linux_vst_gui_support.cc') 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 #include #include +#include #include #include @@ -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; } -- cgit v1.2.3