From 371ce39cfcd21d98cd53dbe50922bd3595986cf9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 11 Apr 2006 16:26:26 +0000 Subject: [PATCH] Don't dereference info before checking it for NULL. (Coverity) 2006-04-11 Matthias Clasen * gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't dereference info before checking it for NULL. (Coverity) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkinputdialog.c | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e5870a0984..25581bc0cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-11 Matthias Clasen + + * gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't + dereference info before checking it for NULL. (Coverity) + 2006-04-11 Anders Carlsson * gdk/quartz/GdkQuartzView.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e5870a0984..25581bc0cf 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-04-11 Matthias Clasen + + * gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't + dereference info before checking it for NULL. (Coverity) + 2006-04-11 Anders Carlsson * gdk/quartz/GdkQuartzView.c: diff --git a/gtk/gtkinputdialog.c b/gtk/gtkinputdialog.c index 397b700356..9f7b03f5bb 100644 --- a/gtk/gtkinputdialog.c +++ b/gtk/gtkinputdialog.c @@ -454,11 +454,13 @@ gtk_input_dialog_set_mapping_mode (GtkWidget *w, { GtkInputDialog *inputd = input_dialog_from_widget (w); GdkDevice *info = inputd->current_device; - GdkInputMode old_mode = info->mode; + GdkInputMode old_mode; GdkInputMode mode = GPOINTER_TO_INT (data); if (!info) return; + + old_mode = info->mode; if (mode != old_mode) {