- [#8589] Scripts which use file selector not working correctly

Fix for another bug I introduced with persistent python windows.
also removed unused var.
This commit is contained in:
2008-03-17 18:01:59 +00:00
parent f96064d33c
commit aee5cb7762
2 changed files with 10 additions and 3 deletions

View File

@@ -535,10 +535,17 @@ static void getSelectedFile( char *name )
fprintf(stderr, "BPy error: Callback call failed!\n");
}
else Py_DECREF(result);
if (script->py_browsercallback == pycallback) {
SCRIPT_SET_NULL(script);
if (script->flags & SCRIPT_GUI) {
script->py_browsercallback = NULL;
} else {
SCRIPT_SET_NULL(script);
}
}
/* else another call to selector was made inside pycallback */
Py_DECREF(pycallback);