Fixed a segfault condition if doing "splitpaint" on a zero-area

rectangle.  Likewise, this also fixes an unexpected result when
doing "spliterase" on a zero-area rectangle (which does not cause
a segfault, but is not what one would want magic to do).
This commit is contained in:
Tim Edwards 2021-11-24 10:00:15 -05:00
parent a6e57093f8
commit 6b72a51b17
2 changed files with 5 additions and 1 deletions

View File

@ -1 +1 @@
8.3.230
8.3.231

View File

@ -2735,6 +2735,8 @@ CmdSplit(w, cmd)
if ((direction = GeoNameToPos(cmd->tx_argv[1], FALSE, TRUE)) < 0)
return;
if (GEO_RECTNULL(&editRect)) return; /* Nothing to do */
if (cmd->tx_argc == 4)
{
if (!CmdParseLayers(cmd->tx_argv[3], &mask2))
@ -2824,6 +2826,8 @@ CmdSplitErase(w, cmd)
if (!ToolGetEditBox(&editRect)) return;
if (GEO_RECTNULL(&editRect)) return; /* Nothing to do */
if ((direction = GeoNameToPos(cmd->tx_argv[1], FALSE, TRUE)) < 0)
return;