[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29308] trunk/blender/source/blender/ windowmanager/intern/wm_jobs.c: fix for crash with the job system progress bar on load, matt you may want to check if this case should be happening at all.

Campbell Barton ideasman42 at gmail.com
Mon Jun 7 16:54:42 CEST 2010


Revision: 29308
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29308
Author:   campbellbarton
Date:     2010-06-07 16:54:42 +0200 (Mon, 07 Jun 2010)

Log Message:
-----------
fix for crash with the job system progress bar on load, matt you may want to check if this case should be happening at all.

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_jobs.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_jobs.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_jobs.c	2010-06-07 14:38:59 UTC (rev 29307)
+++ trunk/blender/source/blender/windowmanager/intern/wm_jobs.c	2010-06-07 14:54:42 UTC (rev 29308)
@@ -449,12 +449,15 @@
 		}
 	}
 	
-	/* if there are running jobs, set the global progress indicator */
-	if (jobs_progress > 0) {
-		float progress = total_progress / (float)jobs_progress;
-		WM_progress_set(wm->winactive, progress);
-	} else {
-		WM_progress_clear(wm->winactive);
+	/* on file load 'winactive' can be NULL, possibly it should not happen but for now do a NULL check - campbell */
+	if(wm->winactive) {
+		/* if there are running jobs, set the global progress indicator */
+		if (jobs_progress > 0) {
+			float progress = total_progress / (float)jobs_progress;
+			WM_progress_set(wm->winactive, progress);
+		} else {
+			WM_progress_clear(wm->winactive);
+		}
 	}
 }
 





More information about the Bf-blender-cvs mailing list