Remove useless condition in __ms_signal_destroy() 80/233980/1
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Apr 2020 06:51:57 +0000 (15:51 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 21 May 2020 02:41:49 +0000 (11:41 +0900)
The first parameter of GST_IS_ELEMENT() macro is nullable
by looking inside of it. If null is set, it will return false.

Change-Id: I83bcdeccfd24623649de73ea159427dd3f93ba24
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
src/media_streamer_util.c

index 8cd5cd5d3d12197fc32c9470028ac4101ea34251..8e810699eac41fe7e06054705ba3ef9486a3d70a 100644 (file)
@@ -321,7 +321,7 @@ void __ms_signal_destroy(void *data)
 
        ms_retm_if(!sig_data, "Empty signal data!");
 
-       if (sig_data->obj && GST_IS_ELEMENT(sig_data->obj)) {
+       if (GST_IS_ELEMENT(sig_data->obj)) {
                if (g_signal_handler_is_connected(sig_data->obj, sig_data->signal_id)) {
                        g_signal_handler_disconnect(sig_data->obj, sig_data->signal_id);
                        ms_debug("Signal with id[%lu] disconnected from object [%s].", sig_data->signal_id, GST_OBJECT_NAME(sig_data->obj));