mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 11:27:45 +01:00
Prevent double free of global observers
We accomplish this by explicitly setting the global_obs to NULL after free'ing it. The crash that led to this fix can be replicated as such $ sendosc localhost 3819 /set_surface i 8 i 159 i 8 $ sendosc localhost 3819 /set_surface i 0 i 0 i 0 $ sendosc localhost 3819 /set_surface i 0 i 0 i 0 In this example the observer is created, then free'd, and then free'd *again* because the new observer was never made (sur->feedback[x] checks fail)
This commit is contained in:
parent
379115a20e
commit
810b2fb78d
1 changed files with 1 additions and 0 deletions
|
|
@ -2243,6 +2243,7 @@ OSC::global_feedback (OSCSurface* sur)
|
|||
OSCGlobalObserver* o = sur->global_obs;
|
||||
if (o) {
|
||||
delete o;
|
||||
sur->global_obs = NULL;
|
||||
}
|
||||
if (sur->feedback[4] || sur->feedback[3] || sur->feedback[5] || sur->feedback[6]) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue