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:
parent
a6e57093f8
commit
6b72a51b17
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue