GPencil: Fix segment fault when use F3 search menu.

Author of the patch: Robert Guetzkow (@rjg)
This commit is contained in:
Author Name
2019-03-30 16:03:39 +01:00
committed by Antonioya
parent 127ad4fa4a
commit 4b6a4b5bc2

View File

@@ -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;