Don't dereference info before checking it for NULL. (Coverity)

2006-04-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't
	dereference info before checking it for NULL.  (Coverity)
This commit is contained in:
Matthias Clasen 2006-04-11 16:26:26 +00:00 committed by Matthias Clasen
parent 383f83c102
commit 371ce39cfc
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't
dereference info before checking it for NULL. (Coverity)
2006-04-11 Anders Carlsson <andersca@mac.imendio.com>
* gdk/quartz/GdkQuartzView.c:

View File

@ -1,3 +1,8 @@
2006-04-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkinputdialog.c (gtk_input_dialog_set_mapping_mode): Don't
dereference info before checking it for NULL. (Coverity)
2006-04-11 Anders Carlsson <andersca@mac.imendio.com>
* gdk/quartz/GdkQuartzView.c:

View File

@ -454,12 +454,14 @@ 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)
{
if (gdk_device_set_mode (info, mode))