example: check if a input_method_context is null.
[platform/core/uifw/libds-tizen.git] / examples / tinyds-tdm.c
index 2108efc..a797ca2 100644 (file)
@@ -2513,6 +2513,10 @@ add_new_input_method_context(struct tinyds_input_method *input_method,
     context->input = text_input;
 
     context->context = ds_tizen_input_method_create_context(input_method->input_method);
+    if (context->context == NULL) {
+        ds_err("ds_tizen_input_method_create_context() failed.");
+        return false;
+    }
 
     context->destroy.notify = context_handle_destroy;
     ds_tizen_input_method_context_add_destroy_listener(context->context,