projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
db8fadb
)
fix crash in 3.4 that doesnt show up in work
author
Dana Jansens
<danakj@orodu.net>
Mon, 8 Feb 2010 23:06:16 +0000
(18:06 -0500)
committer
Dana Jansens
<danakj@orodu.net>
Mon, 8 Feb 2010 23:06:51 +0000
(18:06 -0500)
openbox/translate.c
patch
|
blob
|
history
diff --git
a/openbox/translate.c
b/openbox/translate.c
index
bd8b88f
..
71a919c
100644
(file)
--- a/
openbox/translate.c
+++ b/
openbox/translate.c
@@
-166,7
+166,11
@@
gchar *translate_keycode(guint keycode)
if ((sym = XKeycodeToKeysym(ob_display, keycode, 0)) != NoSymbol)
ret = XKeysymToString(sym);
- return g_locale_to_utf8(ret, -1, NULL, NULL, NULL);
+ /* glib crashes in g_locale_to_utf8 if you pass it NULL here */
+ if (ret)
+ return g_locale_to_utf8(ret, -1, NULL, NULL, NULL);
+ else
+ return NULL;
}
gunichar translate_unichar(guint keycode)