forked from enlightenment/efl
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:
parent
bbf9e38a6d
commit
8fe2ec9d4b
|
@ -1062,6 +1062,8 @@ _ecore_imf_xim_preedit_callback_set(Ecore_IMF_Context *ctx)
|
||||||
{
|
{
|
||||||
Ecore_IMF_Context_Data *imf_context_data;
|
Ecore_IMF_Context_Data *imf_context_data;
|
||||||
imf_context_data = ecore_imf_context_data_get(ctx);
|
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.client_data = (XPointer)ctx;
|
||||||
imf_context_data->preedit_start_cb.callback = (XIMProc)_ecore_imf_xim_preedit_start_call;
|
imf_context_data->preedit_start_cb.callback = (XIMProc)_ecore_imf_xim_preedit_start_call;
|
||||||
|
|
Loading…
Reference in New Issue