Fixed Prevent issue for Dereference numm return value 98/34198/1
authorWonkeun Oh <wonkeun.oh@samsung.com>
Fri, 16 Jan 2015 06:06:47 +0000 (15:06 +0900)
committerLi Zhang <li2012.zhang@samsung.com>
Thu, 22 Jan 2015 02:53:35 +0000 (10:53 +0800)
Change-Id: I09e1d4ac5d6f8ed6531d182e6f4809a13e843331

ism/utils/scim_x11_utils.cpp

index 680eeee..bfa9219 100644 (file)
@@ -74,6 +74,9 @@ initialize_modifier_bits (Display *display)
     __current_hyper_mask   = 0;
     __current_numlock_mask = 0;
 
+    if (!mods)
+        return;
+
     /* We skip the first three sets for Shift, Lock, and Control.  The
        remaining sets are for Mod1, Mod2, Mod3, Mod4, and Mod5.  */
     for (i = 3; i < 8; i++) {