diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-01-13 08:05:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-01-13 08:05:10 +0300 |
commit | 6a9d93a339478fb5f052001ad38e30aa26b0f2ea (patch) | |
tree | 0e1b043a167158290b7f20fe580d3c642b9df39b /source/blender/editors/gpencil/gpencil_edit.c | |
parent | 8227b3d463955d887a987fe546d8eefa2757a982 (diff) |
fix for NULL missing pointer check, reported on IRC by admix.
also rename BVH class for consistency.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index e7660659dfa..b7f13ebe0b7 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -543,9 +543,9 @@ static int gp_convert_poll (bContext *C) { bGPdata *gpd= gpencil_data_get_active(C); ScrArea *sa= CTX_wm_area(C); - + /* only if there's valid data, and the current view is 3D View */ - return ((sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd)); + return ((sa && sa->spacetype == SPACE_VIEW3D) && gpencil_layer_getactive(gpd)); } static int gp_convert_layer_exec (bContext *C, wmOperator *op) |