]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/commitdiff
gst/elements/gstfilesink.c: Don't use NULL pointers.
authorWim Taymans <wim.taymans@gmail.com>
Thu, 6 Oct 2005 13:24:28 +0000 (13:24 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Thu, 6 Oct 2005 13:24:28 +0000 (13:24 +0000)
Original commit message from CVS:
* gst/elements/gstfilesink.c: (gst_file_sink_close_file):
Don't use NULL pointers.

ChangeLog
gst/elements/gstfilesink.c
plugins/elements/gstfilesink.c

index 5dbe6e991def32f9a6317a7f5cf9ae43c279a745..fcd1c4f2bc412a427c987b4a95b82e08d205d12c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-06  Wim Taymans  <wim@fluendo.com>
+
+       * gst/elements/gstfilesink.c: (gst_file_sink_close_file):
+       Don't use NULL pointers.
+
 2005-10-06  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * gst/gst_private.h:
 2005-10-06  Thomas Vander Stichele  <thomas at apestaart dot org>
 
        * gst/gst_private.h:
index 6893758dd95dd75b0bb830ad10883587c12b99df..ec99bddcdf8660a750793facb42f5269b2a596d2 100644 (file)
@@ -261,9 +261,11 @@ gst_file_sink_open_file (GstFileSink * sink)
 static void
 gst_file_sink_close_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);
+    }
   }
 }
 
   }
 }
 
index 6893758dd95dd75b0bb830ad10883587c12b99df..ec99bddcdf8660a750793facb42f5269b2a596d2 100644 (file)
@@ -261,9 +261,11 @@ gst_file_sink_open_file (GstFileSink * sink)
 static void
 gst_file_sink_close_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);
+    }
   }
 }
 
   }
 }