summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Russell <cody@jhu.edu>2013-08-15 15:08:34 -0500
committerCody Russell <cody@jhu.edu>2013-08-15 15:11:50 -0500
commit36e26c8a031bab3365e7a2818666ec41bbb6693b (patch)
treed1d55efd44177bff79bd5227665a14e1e4569f6a
parent5af66c3f0d1de5d384908c846149a391776afc1a (diff)
downloadgtk+-36e26c8a031bab3365e7a2818666ec41bbb6693b.tar.gz
Fix a crasher that was introduced by 9ca802161ec6387419d160f21fe477008a567477
due to preedit_str being initialized as an empty string rather than NULL.
-rw-r--r--modules/input/imquartz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/input/imquartz.c b/modules/input/imquartz.c
index 9e42d8fcfa..06ebc6837b 100644
--- a/modules/input/imquartz.c
+++ b/modules/input/imquartz.c
@@ -230,7 +230,7 @@ discard_preedit (GtkIMContext *context)
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
[currentInputManager markedTextAbandoned:nsview];
- if (qc->preedit_str)
+ if (qc->preedit_str && strlen (qc->preedit_str) > 0)
{
g_signal_emit_by_name (context, "commit", qc->preedit_str);