diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-30 15:08:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-30 15:08:53 +0400 |
commit | 5255c23cb7a4ce63410e92a22ebdb58829c48f1a (patch) | |
tree | d00a947716450ea09a1040184dba4c8b429e6907 /source/blender/editors/space_clip/space_clip.c | |
parent | 8f3ed0501e78d62b2b507d5befb454a5c98375d2 (diff) |
code cleanup: clang warning - use of a pointer before checking its NULL.
Diffstat (limited to 'source/blender/editors/space_clip/space_clip.c')
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 4044568b70d..f64d2ba90cb 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -779,11 +779,12 @@ static void clip_refresh(const bContext *C, ScrArea *sa) } 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; |