Remove useless condition in __ms_signal_destroy() 51/230951/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, 16 Apr 2020 06:55:02 +0000 (15:55 +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 5208632..8428b95 100644 (file)
@@ -318,7 +318,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));