mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
assert no null pointer dereference
This commit is contained in:
parent
fe6e6e3f35
commit
7518c363e5
1 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <signal.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) {
|
if (vstfx_first == vstfx) {
|
||||||
vstfx_first = vstfx_first->next;
|
vstfx_first = vstfx_first->next;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue