assert no null pointer dereference
This commit is contained in:
parent
fe6e6e3f35
commit
7518c363e5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user