Made space handelers check that G_DOSCRIPTLINKS is enabled before running.

Its scary to think that a redraw space handeler could run
  import os
  os.system('rm -rf ~/')
removing all user files, Just by opening the blend file!

This means at least you can opt not to run any python scripts you dont want to..
This commit is contained in:
2006-04-26 08:22:39 +00:00
parent f9597df32d
commit b69db8f090
2 changed files with 4 additions and 4 deletions

View File

@@ -1247,9 +1247,9 @@ int BPY_do_spacehandlers( ScrArea *sa, unsigned short event,
{
ScriptLink *scriptlink;
int retval = 0;
if (!sa) return 0;
if (!sa || !(G.f & G_DOSCRIPTLINKS)) return 0;
scriptlink = &sa->scriptlink;
if (scriptlink->totscript > 0) {