ximmodule: check whether pointer is NULL before accessing in xim_preedit_callback_set

ecore_imf_context_data_get () can return NULL, so it should be checked before using the result value.

This fixes CID 1135273
This commit is contained in:
Jihoon Kim 2013-12-03 13:32:15 +09:00
parent bbf9e38a6d
commit 8fe2ec9d4b
1 changed files with 2 additions and 0 deletions

View File

@ -1062,6 +1062,8 @@ _ecore_imf_xim_preedit_callback_set(Ecore_IMF_Context *ctx)
{
Ecore_IMF_Context_Data *imf_context_data;
imf_context_data = ecore_imf_context_data_get(ctx);
if (!imf_context_data)
return XVaCreateNestedList(0, NULL);
imf_context_data->preedit_start_cb.client_data = (XPointer)ctx;
imf_context_data->preedit_start_cb.callback = (XIMProc)_ecore_imf_xim_preedit_start_call;