Fix issue detected by static analysis tool 76/317476/3
authorInhong Han <inhong1.han@samsung.com>
Wed, 11 Sep 2024 01:08:58 +0000 (10:08 +0900)
committerInhong Han <inhong1.han@samsung.com>
Wed, 11 Sep 2024 01:29:12 +0000 (10:29 +0900)
Change-Id: I6d4ef10cce2917eb33bb4226dc7536076ecfdf1a

src/e_mod_input_panel.c
src/e_mod_main.c

index 42e40b55aca7ca8eac67219087e26572487980fd..79de56894b3e5d44ec0f7b63a8b7c9b6d4f7a7dc 100644 (file)
@@ -1704,7 +1704,8 @@ e_input_panel_floating_position_set(int x, int y)
    E_Input_Panel_Surface *floating_ips = NULL;
 
    floating_ips = _e_input_floating_panel_surface_get();
-   floating_ec = floating_ips->ec;
+   if (floating_ips)
+     floating_ec = floating_ips->ec;
 
    if (!floating_ec || !floating_ips)
      {
index 20e061a9ea61ec071b5c28a424b68dcff584a59b..30284d4d7c85d0587ef5ff66ec117462725fb37c 100644 (file)
@@ -868,7 +868,7 @@ _e_text_input_method_context_cb_modifiers_map(struct wl_client *client EINA_UNUS
 }
 
 static void
-_e_keyevent_free(void *data EINA_UNUSED, void *ev)
+_e_keyevent_free(void *ev)
 {
    Ecore_Event_Key *e = ev;
 
@@ -904,16 +904,16 @@ feed_key_event(const char *keyname, const char *key, const char *string, int key
 
    if (!e_input_thread_mode_get())
      {
-        ecore_event_add(state ? ECORE_EVENT_KEY_DOWN : ECORE_EVENT_KEY_UP, e, _e_keyevent_free, NULL);
+        ecore_event_add(state ? ECORE_EVENT_KEY_DOWN : ECORE_EVENT_KEY_UP, e, NULL, NULL);
      }
    else
      {
         E_Input_Event_Source *input_event_source = e_input_event_source_get();
         if (input_event_source)
-          e_input_event_add(input_event_source, state ? ECORE_EVENT_KEY_DOWN : ECORE_EVENT_KEY_UP, e, _e_keyevent_free, NULL);
-        else
-          _e_keyevent_free(NULL, e);
+          e_input_event_add(input_event_source, state ? ECORE_EVENT_KEY_DOWN : ECORE_EVENT_KEY_UP, e, NULL, NULL);
      }
+
+   _e_keyevent_free(e);
 }
 
 static void