[PATCH 2/2] Revert "winegstreamer: Remove redundant null check before g_error_free."
Alex Henrie
alexhenrie24 at gmail.com
Mon Nov 28 23:35:53 CST 2016
Cc: Andrew Eikum <aeikum at codeweavers.com>
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:
https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-return-if-fail
I'm going to stop trying to clean up winegstreamer; I'm not any closer
to resolving bug 29920 and I'm just making mistakes.
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
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 c15d913..ab80167 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1088,7 +1088,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;
}
--
2.10.2
More information about the wine-patches
mailing list