[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46108] trunk/blender/source/blender/ editors/space_clip/space_clip.c: code cleanup: clang warning - use of a pointer before checking its NULL.

Campbell Barton ideasman42 at gmail.com
Mon Apr 30 13:08:53 CEST 2012


Revision: 46108
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46108
Author:   campbellbarton
Date:     2012-04-30 11:08:53 +0000 (Mon, 30 Apr 2012)
Log Message:
-----------
code cleanup: clang warning - use of a pointer before checking its NULL.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_clip/space_clip.c

Modified: trunk/blender/source/blender/editors/space_clip/space_clip.c
===================================================================
--- trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-04-30 10:47:32 UTC (rev 46107)
+++ trunk/blender/source/blender/editors/space_clip/space_clip.c	2012-04-30 11:08:53 UTC (rev 46108)
@@ -779,11 +779,12 @@
 	}
 	else {
 		/* store graph region align */
-		if (ar_preview->alignment == RGN_ALIGN_TOP)
-			sc->runtime_flag &= ~SC_GRAPH_BOTTOM;
-		else if (ar_preview->alignment == RGN_ALIGN_BOTTOM)
-			sc->runtime_flag |= SC_GRAPH_BOTTOM;
-
+		if (ar_preview) {
+			if (ar_preview->alignment == RGN_ALIGN_TOP)
+				sc->runtime_flag &= ~SC_GRAPH_BOTTOM;
+			else if (ar_preview->alignment == RGN_ALIGN_BOTTOM)
+				sc->runtime_flag |= SC_GRAPH_BOTTOM;
+		}
 		if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) {
 			ar_preview->flag |= RGN_FLAG_HIDDEN;
 			ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;




More information about the Bf-blender-cvs mailing list