diff options
author | jusung <jusung07.son@samsung.com> | 2021-05-10 15:01:38 +0900 |
---|---|---|
committer | jusung <jusung07.son@samsung.com> | 2021-05-10 15:02:53 +0900 |
commit | 29e7fe77124959c47f903dd8a1a4df2781e55ce8 (patch) | |
tree | 9ff11376f49591f9d8d0eacc88841fb25ab53fac | |
parent | c5ec22515c08f64bce78c0e33acd332db1477de7 (diff) | |
download | minicontrol-29e7fe77124959c47f903dd8a1a4df2781e55ce8.tar.gz minicontrol-29e7fe77124959c47f903dd8a1a4df2781e55ce8.tar.bz2 minicontrol-29e7fe77124959c47f903dd8a1a4df2781e55ce8.zip |
Fix segmentation fault
- The pd info can be deleted in the event callback.
Change-Id: I0c4e3a405c349c4e326656ae5668843d4338fa10
Signed-off-by: jusung <jusung07.son@samsung.com>
-rw-r--r-- | src/minicontrol-provider.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/minicontrol-provider.c b/src/minicontrol-provider.c index 6576d58..9d3b459 100644 --- a/src/minicontrol-provider.c +++ b/src/minicontrol-provider.c @@ -145,6 +145,7 @@ static void _sig_to_provider_handler_cb(void *data, GVariant *parameters) unsigned int serialized_arg_length = 0; Evas_Coord width; Evas_Coord height; + minicontrol_event_cb event_callback; if (!pd) { ERR("provider is NULL"); @@ -170,12 +171,17 @@ static void _sig_to_provider_handler_cb(void *data, GVariant *parameters) MINICONTROL_EVENT_RESIZE, pd->name, width, height, 0, 0); } + event_callback = pd->event_callback; + g_rec_mutex_unlock(&pd->mutex); - if (pd->event_callback) - pd->event_callback(event, event_arg_bundle); + if (event_callback) + event_callback(event, event_arg_bundle); if (event_arg_bundle) bundle_free(event_arg_bundle); + + return; + } g_rec_mutex_unlock(&pd->mutex); } |