bugfix for own error, introduced when running scripts were saved with the blend file.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 31 May 2008 12:12:03 +0000 (12:12 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 31 May 2008 12:12:03 +0000 (12:12 +0000)
a script error with a script that has an interface would not stop the interface from running again immediately, causing an annoying
error message loop.

source/blender/python/api2_2x/Draw.c

index 3d4546613be47d74481bba65f76ce8a29d472e6c..047a035fb8b4c5d6ddb78e24593e21e38f900ba4 100644 (file)
@@ -613,6 +613,8 @@ static void exit_pydraw( SpaceScript * sc, short err )
                PyErr_Print(  );
                script->flags = 0;      /* mark script struct for deletion */
                SCRIPT_SET_NULL(script);
                PyErr_Print(  );
                script->flags = 0;      /* mark script struct for deletion */
                SCRIPT_SET_NULL(script);
+               script->scriptname[0] = '\0';
+               script->scriptarg[0] = '\0';
                error_pyscript();
                scrarea_queue_redraw( sc->area );
        }
                error_pyscript();
                scrarea_queue_redraw( sc->area );
        }