forked from bartvdbraak/blender
Bugfix #18649
Grease pencil, floating panel, "Delete last stroke" crashed when there were no strokes. Simple NULL check added.
This commit is contained in:
parent
f56bfbdd0c
commit
133c91dd2f
@ -139,12 +139,14 @@ void gp_ui_delstroke_cb (void *gpd, void *gpl)
|
||||
{
|
||||
bGPDframe *gpf= gpencil_layer_getframe(gpl, CFRA, 0);
|
||||
|
||||
if (gpf->framenum != CFRA) return;
|
||||
if (gpf) {
|
||||
if (gpf->framenum != CFRA) return;
|
||||
|
||||
gpencil_layer_setactive(gpd, gpl);
|
||||
gpencil_frame_delete_laststroke(gpl, gpf);
|
||||
|
||||
scrarea_queue_winredraw(curarea);
|
||||
gpencil_layer_setactive(gpd, gpl);
|
||||
gpencil_frame_delete_laststroke(gpl, gpf);
|
||||
|
||||
scrarea_queue_winredraw(curarea);
|
||||
}
|
||||
}
|
||||
|
||||
/* delete active frame of active layer */
|
||||
|
Loading…
Reference in New Issue
Block a user