wl_text_input: initializes input_method's context when destroy context. 48/47948/1
authorSeunghun Lee <beauty.positive3@gmail.com>
Mon, 7 Sep 2015 17:13:52 +0000 (13:13 -0400)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 10 Sep 2015 08:09:08 +0000 (17:09 +0900)
Summary: input_method's context set to NULL when context is freed.

Test Plan: N/A

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3015

Change-Id: Ie97830a4fed062ae477ff1bdb7878819b2dc39ce

src/e_mod_main.c

index 7710513dc546e12ddc79f3575208cbff5fed9764..2256475c15761e58f6dc125e25ac3a7f91ba6158 100644 (file)
@@ -332,6 +332,10 @@ _e_text_input_method_context_cb_resource_destroy(struct wl_resource *resource)
    if (context->keyboard)
      wl_resource_destroy(context->keyboard);
 
+   if ((context->input_method) &&
+       (context->input_method->context == context))
+     context->input_method->context = NULL;
+
    free(context);
 }