[gtk+] NULL check on default keymap



commit 0e4bac872c0cc3df1cafc23f1fa42e3b939d4866
Author: Philip Chimento <philip chimento gmail com>
Date:   Tue Aug 27 23:46:22 2013 -0700

    NULL check on default keymap
    
    Ensure that Quartz's default keymap is not accessed before it is
    created.

 gdk/quartz/gdkkeys-quartz.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkkeys-quartz.c b/gdk/quartz/gdkkeys-quartz.c
index 8ecf79e..d2b5110 100644
--- a/gdk/quartz/gdkkeys-quartz.c
+++ b/gdk/quartz/gdkkeys-quartz.c
@@ -492,7 +492,8 @@ update_keymap (void)
         p[0] = known_numeric_keys[i].keypad_keyval;
     }
 
-  g_signal_emit_by_name (default_keymap, "keys-changed");
+  if (default_keymap != NULL)
+    g_signal_emit_by_name (default_keymap, "keys-changed");
 }
 
 static PangoDirection


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]