[Bf-blender-cvs] [4b6a4b5bc25] master: GPencil: Fix segment fault when use F3 search menu.

Author Name noreply at git.blender.org
Sat Mar 30 16:08:44 CET 2019


Commit: 4b6a4b5bc25bce10367dffadf7718e373f81f299
Author: Author Name
Date:   Sat Mar 30 16:03:39 2019 +0100
Branches: master
https://developer.blender.org/rB4b6a4b5bc25bce10367dffadf7718e373f81f299

GPencil: Fix segment fault when use F3 search menu.

Author of the patch: Robert Guetzkow (@rjg)

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

M	source/blender/editors/gpencil/gpencil_data.c

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

diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 2d5ec4c5055..e3d57149d0f 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -176,7 +176,7 @@ static bool gp_data_unlink_poll(bContext *C)
 	bGPdata **gpd_ptr = ED_gpencil_data_get_pointers(C, NULL);
 
 	/* only unlink annotation datablocks */
-	if (gpd_ptr != NULL) {
+	if ((gpd_ptr != NULL) && (*gpd_ptr != NULL)) {
 		bGPdata *gpd = (*gpd_ptr);
 		if ((gpd->flag & GP_DATA_ANNOTATIONS) == 0) {
 			return false;



More information about the Bf-blender-cvs mailing list