[gtk/wip/otte/for-master: 5/10] device: Handle missing axis
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 5/10] device: Handle missing axis
- Date: Thu, 5 Mar 2020 06:07:33 +0000 (UTC)
commit c7dd598a81e904379dec6a44e6a4535c52165cdc
Author: Benjamin Otte <otte redhat com>
Date: Thu Mar 5 06:57:26 2020 +0100
device: Handle missing axis
gdk/gdkdevice.c | 4 ++++
gtk/gtkicontheme.c | 1 +
2 files changed, 5 insertions(+)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index f21df4e460..ac15dd6499 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -1354,11 +1354,15 @@ _gdk_device_translate_surface_coord (GdkDevice *device,
{
axis_info_x = &axis_info;
axis_info_y = find_axis_info (device->axes, GDK_AXIS_Y);
+ if (axis_info_y == NULL)
+ return FALSE;
}
else
{
axis_info_x = find_axis_info (device->axes, GDK_AXIS_X);
axis_info_y = &axis_info;
+ if (axis_info_x == NULL)
+ return FALSE;
}
device_width = axis_info_x->max_value - axis_info_x->min_value;
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index b65caad8e7..58c6bc4417 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -4086,6 +4086,7 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self,
/* We can't render emblemed icons atm, but at least render the base */
while (G_IS_EMBLEMED_ICON (gicon))
gicon = g_emblemed_icon_get_icon (G_EMBLEMED_ICON (gicon));
+ g_assert (gicon); /* shut up gcc -Wnull-dereference */
if (GDK_IS_PIXBUF (gicon))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]