From aa49444c291fd54e5e45576a28d36d72816a5469 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 8 Mar 2019 17:58:20 -0300 Subject: Fix crash when deleting workspaces too fast Delete workspaces via the menu was not refreshing the workspace tabs drawing. This way if you deleted the non-active workspace with the "e" shortcut from the workspace tab context menu and clicked on the workspace tabs again, it would crash. A few notes: * Deleting a non-active workspace is changing which workspace is then active, which is really strange. * Even when deleting the active workspace which workspace then becomes active seems random. * Using notifiers (ND_WORKSPACE_DELETE) to delete the workspace seems rather abusing notifiers in my humble opinion. This is not an important bugfix anyways, people probably would rarely run into this. I just ran into it while investigating another bug. --- source/blender/editors/screen/workspace_edit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/screen/workspace_edit.c') diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c index b442f718aa1..b63a755368e 100644 --- a/source/blender/editors/screen/workspace_edit.c +++ b/source/blender/editors/screen/workspace_edit.c @@ -301,6 +301,7 @@ static int workspace_delete_exec(bContext *C, wmOperator *UNUSED(op)) { WorkSpace *workspace = workspace_context_get(C); WM_event_add_notifier(C, NC_SCREEN | ND_WORKSPACE_DELETE, workspace); + WM_event_add_notifier(C, NC_WINDOW, NULL); return OPERATOR_FINISHED; } -- cgit v1.2.3