revolve possible null pointer dereference found by cppcheck
[channels/tsmf/client/gstreamer/tsmf_X11.c:472] -> [channels/tsmf/client/gstreamer/tsmf_X11.c:474]: (warning) Either the condition '!decoder' is redundant or there is possible null pointer dereference: decoder.
@@ -469,11 +469,12 @@ int tsmf_window_unmap(TSMFGstreamerDecoder* decoder)
int tsmf_window_destroy(TSMFGstreamerDecoder* decoder)
{
struct X11Handle* hdl;
- decoder->ready = FALSE;
if (!decoder)
return -1;
+ decoder->ready = FALSE;
+
if (decoder->media_type != TSMF_MAJOR_TYPE_VIDEO)
return -3;
