forked from bartvdbraak/blender
[8559] Python script that uses FIleSelector and has an error in it segfaults Blender
Want completely fixed, check if the script was removed before running the callback.
This commit is contained in:
parent
bead422c1f
commit
26daad49a3
@ -513,6 +513,14 @@ static void getSelectedFile( char *name )
|
||||
script = sc->script;
|
||||
}
|
||||
}
|
||||
/* If 'script' is null,
|
||||
* The script must have had an error and closed,
|
||||
* but the fileselector was left open, show an error and exit */
|
||||
if (!script) {
|
||||
error("Python script error: script quit, cannot run callback");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
pycallback = script->py_browsercallback;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user