Alex Henrie : Revert "winegstreamer: Remove redundant null check before g_error_free.".

Alexandre Julliard julliard at winehq.org
Wed Nov 30 16:56:58 CST 2016


Module: wine
Branch: master
Commit: 5c54963482bcd701c825b7936056a49b113410e5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5c54963482bcd701c825b7936056a49b113410e5

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Mon Nov 28 22:35:53 2016 -0700

Revert "winegstreamer: Remove redundant null check before g_error_free.".

This reverts commit 976ccb92ea745d8a79a2d0a25d37268bb4dc62a6.

This is what I get for not reading the documentation...if you call
g_error_free(NULL), it prints a nasty error message, which I am now
getting frequently.

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/gstdemux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 20acd0e..03d8d5b 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1083,7 +1083,8 @@ static GstBusSyncReply watch_bus(GstBus *bus, GstMessage *msg, gpointer data)
         WARN("%s: %s\n", GST_OBJECT_NAME(msg->src), err->message);
         WARN("%s\n", dbg_info);
     }
-    g_error_free(err);
+    if (err)
+        g_error_free(err);
     g_free(dbg_info);
     return GST_BUS_DROP;
 }




More information about the wine-cvs mailing list