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.
This commit is contained in:
Ilya Shipitsin 2017-02-17 16:52:21 +05:00
parent 3c7cc555a5
commit 44cfb0119f
1 changed files with 2 additions and 1 deletions

View File

@ -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;