Fix a crasher that was introduced by 9ca802161ec6387419d160f21fe477008a567477

due to preedit_str being initialized as an empty string rather than NULL.
This commit is contained in:
Cody Russell
2013-08-15 15:08:34 -05:00
parent 5af66c3f0d
commit 36e26c8a03

View File

@ -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);