Do not access transform tool handles if NULL or stales
For example starting GIMP and pressing Ctrl-N Enter Shift-T (or Shift-R or Shift-P) showed warnings on the console, and with window manager's focus mode set to 'click' it was also possible to crash GIMP.
This commit is contained in:
@ -473,7 +473,7 @@ gimp_transform_tool_oper_update (GimpTool *tool,
|
||||
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
TransformAction function = TRANSFORM_HANDLE_NONE;
|
||||
|
||||
if (display != tool->display)
|
||||
if (display != tool->display || draw_tool->item == NULL)
|
||||
{
|
||||
gimp_transform_tool_set_function (tr_tool, function);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user