Thomas Faber : winegstreamer: Avoid side-effects in asserts.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 3 07:14:59 CDT 2015


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

Author: Thomas Faber <thomas.faber at reactos.org>
Date:   Fri Apr  3 08:03:51 2015 +0200

winegstreamer: Avoid side-effects in asserts.

---

 dlls/winegstreamer/gstdemux.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index de48efd..c17fc2f 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1074,6 +1074,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *punkout, HRESULT *phr) {
 static void GST_Destroy(GSTImpl *This) {
     IPin *connected = NULL;
     ULONG pinref;
+    HRESULT hr;
 
     TRACE("Destroying\n");
 
@@ -1082,9 +1083,11 @@ static void GST_Destroy(GSTImpl *This) {
     /* Don't need to clean up output pins, disconnecting input pin will do that */
     IPin_ConnectedTo((IPin *)&This->pInputPin, &connected);
     if (connected) {
-        assert(IPin_Disconnect(connected) == S_OK);
+        hr = IPin_Disconnect(connected);
+        assert(hr == S_OK);
         IPin_Release(connected);
-        assert(IPin_Disconnect((IPin *)&This->pInputPin) == S_OK);
+        hr = IPin_Disconnect((IPin *)&This->pInputPin);
+        assert(hr == S_OK);
     }
     pinref = IPin_Release((IPin *)&This->pInputPin);
     if (pinref) {




More information about the wine-cvs mailing list