Commit: 90fb219393fae51fb387308b5366bf9774eae7f1
Author: Campbell Barton
Date:   Sun May 10 20:34:40 2015 +1000
Branches: ui-preview-buttons
https://developer.blender.org/rB90fb219393fae51fb387308b5366bf9774eae7f1

Add safety check in PRV_DEFERRED_DATA

Disallow PRV_DEFERRED_DATA to be used when use_deferred is false

===================================================================

M       source/blender/makesdna/DNA_ID.h

===================================================================

diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index ec169d3..f68de03 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -183,7 +183,7 @@ typedef struct PreviewImage {
 } PreviewImage;
 
 #define PRV_DEFERRED_DATA(prv) \
-       (CHECK_TYPE_INLINE(prv, PreviewImage *), (void *)((prv) + 1))
+       (CHECK_TYPE_INLINE(prv, PreviewImage *), 
BLI_assert((prv)->use_deferred), (void *)((prv) + 1))
 
 /**
  * Defines for working with IDs.

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

Reply via email to