Fix a crasher that was introduced by 9ca802161e

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 9ca802161e
commit 5ca0280cd3

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