From 6a9d93a339478fb5f052001ad38e30aa26b0f2ea Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Jan 2011 05:05:10 +0000 Subject: fix for NULL missing pointer check, reported on IRC by admix. also rename BVH class for consistency. --- source/blender/editors/gpencil/gpencil_edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/gpencil') 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) -- cgit v1.2.3