Commit b31729f8 authored by Jehan's avatar Jehan

app: expect event == NULL in gimp_device_info_get_event_coords().

The problem was not happening with the master code of
gimpdisplayshell-tool-events.c, but I encountered it in gimp-2-10 with
the layer picking code.
Even then, it still works, but I need to protect calls to
gdk_event_get_axis() to avoid CRITICALs.

(cherry picked from commit b1fe1675)

Note: this was not absolutely necessary on master (no CRITICALs), but I
can see that the same piece of code applies, so I may as well sync.
parent fc55e7bd
......@@ -39,7 +39,7 @@ gimp_device_info_get_event_coords (GimpDeviceInfo *info,
{
gdouble x;
if (gdk_event_get_axis (event, GDK_AXIS_X, &x))
if (event && gdk_event_get_axis (event, GDK_AXIS_X, &x))
{
*coords = default_coords;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment