From cb64b2a5865a87ce39a5e24487a0e1eb5ed6c159 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 6 Oct 2005 13:24:28 +0000 Subject: [PATCH] gst/elements/gstfilesink.c: Don't use NULL pointers. Original commit message from CVS: * gst/elements/gstfilesink.c: (gst_file_sink_close_file): Don't use NULL pointers. --- ChangeLog | 5 +++++ gst/elements/gstfilesink.c | 8 +++++--- plugins/elements/gstfilesink.c | 8 +++++--- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dbe6e9..fcd1c4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-06 Wim Taymans + + * gst/elements/gstfilesink.c: (gst_file_sink_close_file): + Don't use NULL pointers. + 2005-10-06 Thomas Vander Stichele * gst/gst_private.h: diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c index 6893758..ec99bdd 100644 --- a/gst/elements/gstfilesink.c +++ b/gst/elements/gstfilesink.c @@ -261,9 +261,11 @@ gst_file_sink_open_file (GstFileSink * sink) static void gst_file_sink_close_file (GstFileSink * sink) { - if (fclose (sink->file) != 0) { - GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, - (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM); + if (sink->file) { + if (fclose (sink->file) != 0) { + GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, + (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM); + } } } diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index 6893758..ec99bdd 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -261,9 +261,11 @@ gst_file_sink_open_file (GstFileSink * sink) static void gst_file_sink_close_file (GstFileSink * sink) { - if (fclose (sink->file) != 0) { - GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, - (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM); + if (sink->file) { + if (fclose (sink->file) != 0) { + GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, + (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM); + } } } -- 2.7.4