13
0

assert no null pointer dereference

This commit is contained in:
Robin Gareus 2014-11-18 21:59:04 +01:00
parent fe6e6e3f35
commit 7518c363e5

View File

@ -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;
}