diff options
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r-- | source/blender/python/api2_2x/Window.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index 22e19c9f54a..b4a14cc6ac8 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -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); |