diff --git a/VERSION b/VERSION index aee97777..d8da71cc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.296 +8.3.297 diff --git a/commands/CmdTZ.c b/commands/CmdTZ.c index 1e082742..3451f7b9 100644 --- a/commands/CmdTZ.c +++ b/commands/CmdTZ.c @@ -930,7 +930,7 @@ CmdWhat(w, cmd) TxCommand *cmd; /* Information about the command. */ { int i, locargc; - bool foundAny; + bool foundAny, editNull = FALSE; bool doList = FALSE, doListAll = FALSE; TileTypeBitMask layers, maskBits, *rMask; CellUse *CheckUse; @@ -974,12 +974,21 @@ CmdWhat(w, cmd) } #endif + /* The "what" command should not fail if there is no edit cell */ + if (EditCellUse == NULL) + { + editNull = TRUE; + EditCellUse = w->w_surfaceID; + } + /* Find all the selected paint and print out the layer names. */ TTMaskZero(&layers); (void) SelEnumPaint(&DBAllButSpaceAndDRCBits, FALSE, (bool *) NULL, cmdWhatPaintFunc, (ClientData) &layers); + if (editNull == TRUE) EditCellUse = (CellUse *)NULL; + if (!TTMaskIsZero(&layers)) { /* If there are any stacked types in the list, decompose them */