From e170824e9865ca70248e71054436108fb2572de2 Mon Sep 17 00:00:00 2001 From: Chris McKenzie Date: Mon, 20 Mar 2023 18:14:12 -0700 Subject: [PATCH] a cheap fix to prevent the crash described in #334 from happening --- mod_tiling/ops.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mod_tiling/ops.c b/mod_tiling/ops.c index 0bd21912d..bc5059d9f 100644 --- a/mod_tiling/ops.c +++ b/mod_tiling/ops.c @@ -147,13 +147,20 @@ bool mod_tiling_untile(WTiling *tiling) reg2=group_do_attach(grp, ¶m, &data); + // See #334: tiling->unsplit from the context menu crashes notion + if(tiling->managed_list == NULL) { + break; + } + if(reg2==NULL) warn(TR("Unable to move a region from tiling to group.")); } tiling->batchop=FALSE; - region_dispose((WRegion*)tiling); + if(tiling->managed_list != NULL) { + region_dispose((WRegion*)tiling); + } return TRUE; }