[Bf-blender-cvs] [09bb0fffe5b] asset-greasepencil: Fix possible use of NULL pointer
Antonio Vazquez
noreply at git.blender.org
Thu Apr 7 17:38:58 CEST 2022
Commit: 09bb0fffe5b30c57aca9f9407035774e22c3a5b0
Author: Antonio Vazquez
Date: Thu Apr 7 17:29:45 2022 +0200
Branches: asset-greasepencil
https://developer.blender.org/rB09bb0fffe5b30c57aca9f9407035774e22c3a5b0
Fix possible use of NULL pointer
===================================================================
M source/blender/editors/gpencil/gpencil_asset.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_asset.c b/source/blender/editors/gpencil/gpencil_asset.c
index 7f144d4da97..65ef5e42e94 100644
--- a/source/blender/editors/gpencil/gpencil_asset.c
+++ b/source/blender/editors/gpencil/gpencil_asset.c
@@ -1209,9 +1209,10 @@ static void gpencil_asset_import_update(bContext *C, const wmOperator *op, tGPDa
static void gpencil_asset_import_exit(bContext *C, wmOperator *op)
{
tGPDasset *tgpa = op->customdata;
- bGPdata *gpd = tgpa->gpd;
if (tgpa) {
+ bGPdata *gpd = tgpa->gpd;
+
/* Clear status message area. */
ED_area_status_text(tgpa->area, NULL);
ED_workspace_status_text(C, NULL);
@@ -1225,8 +1226,9 @@ static void gpencil_asset_import_exit(bContext *C, wmOperator *op)
}
MEM_SAFE_FREE(tgpa);
+ DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
}
- DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
+
WM_event_add_notifier(C, NC_GPENCIL | NA_EDITED | ND_DATA, NULL);
/* Clear pointer. */
More information about the Bf-blender-cvs
mailing list