From bee0039e437efca8889a9e1a75cdeaf84183fbe7 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 12 Nov 2021 13:57:26 -0500 Subject: [PATCH] More updates to prevent magic from crashing when commands are run on non-edit cells (this time, "erase"). --- commands/CmdE.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands/CmdE.c b/commands/CmdE.c index 9ddf2450..698d8ae8 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -625,6 +625,12 @@ CmdErase(w, cmd) if (!ToolGetEditBox(&editRect)) return; + if (EditCellUse == NULL) + { + TxError("No cell def being edited!\n"); + return; + } + /* * Erase with no arguments is the same as erasing * everything underneath the box tool (ie, painting space)