Fix crash clicking Render button in render layer compositing node. Actually
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 26 Apr 2012 17:48:07 +0000 (17:48 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 26 Apr 2012 17:48:07 +0000 (17:48 +0000)
this crash could happen in other situations too, problem was a bug in the
jobs system. A job could be suspended, and the operator would stop before
the job was actually done since it was not marked as running.

source/blender/windowmanager/intern/wm_jobs.c

index 774aec51216bd5815573ed960c63ee77dd221e3d..877b8a92296c96d30c9aedde1b2b8f47c31f28c1 100644 (file)
@@ -173,10 +173,12 @@ int WM_jobs_test(wmWindowManager *wm, void *owner)
 {
        wmJob *steve;
        
+       /* job can be running or about to run (suspended) */
        for (steve = wm->jobs.first; steve; steve = steve->next)
                if (steve->owner == owner)
-                       if (steve->running)
+                       if (steve->running || steve->suspended)
                                return 1;
+
        return 0;
 }