Revision: 39550
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39550
Author:   psy-fi
Date:     2011-08-19 12:58:20 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
fix crash when exiting paint mode

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c   
2011-08-19 10:38:34 UTC (rev 39549)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c   
2011-08-19 12:58:20 UTC (rev 39550)
@@ -523,11 +523,12 @@
    so that settings can persist when switching back to the same paint mode */
 void paint_mode_exit(struct Paint *p)
 {
-       paint_cursor_stop(p->cache);
-
-       free_cache(p->cache);
-       p->cache=      NULL;
-       p->free_cache= NULL;
+       if(p){
+               paint_cursor_stop(p->cache);
+               free_cache(p->cache);
+               p->cache=      NULL;
+               p->free_cache= NULL;
+       }
 }
 
 int paint_poll(const struct bContext *C)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to