app: check if tool control is active before setting modifier state.

Similar to commit 845eb522b6, I had a CRITICAL which happened on a
device_changed, triggering gimp_display_shell_update_focus(), this time
in focus in.
This commit is contained in:
Jehan 2018-04-04 00:26:41 +02:00
parent 7230d5d777
commit 33822c51c2
1 changed files with 2 additions and 1 deletions

View File

@ -413,7 +413,8 @@ tool_manager_modifier_state_active (Gimp *gimp,
tool_manager = tool_manager_get (gimp);
if (tool_manager->active_tool)
if (tool_manager->active_tool &&
! gimp_tool_control_is_active (tool_manager->active_tool->control))
{
gimp_tool_set_modifier_state (tool_manager->active_tool,
state,