[PATCH 2/3] mciqtz32: Make sure the device is valid before starting the play.

Christian Costa titan.costa at wanadoo.fr
Wed Apr 22 17:03:58 CDT 2009


---

 dlls/mciqtz32/mciqtz.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
-------------- next part --------------
diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c
index 8222199..07b774c 100644
--- a/dlls/mciqtz32/mciqtz.c
+++ b/dlls/mciqtz32/mciqtz.c
@@ -241,6 +241,8 @@ static DWORD MCIQTZ_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms
         return MCIERR_NULL_PARAMETER_BLOCK;
 
     wma = MCIQTZ_mciGetOpenDev(wDevID);
+    if (!wma)
+        return MCIERR_INVALID_DEVICE_ID;
 
     hr = IMediaControl_Run(wma->pmctrl);
     if (FAILED(hr)) {


More information about the wine-patches mailing list