]> git.sesse.net Git - vlc/blobdiff - activex/persiststreaminit.h
Works this time
[vlc] / activex / persiststreaminit.h
index d814216bd77676ed871952f0e78a569b040d6e35..9bd2478cd710d5419b12ae7406033684e082d0c9 100644 (file)
@@ -36,10 +36,12 @@ public:
     // IUnknown methods
     STDMETHODIMP QueryInterface(REFIID riid, void **ppv)
     {
-        if( (NULL != ppv)
-         && (IID_IUnknown == riid) 
-         && (IID_IPersist == riid) 
-         && (IID_IPersistStreamInit == riid) ) {
+        if( NULL == ppv )
+            return E_POINTER;
+        if( (IID_IUnknown == riid)
+         || (IID_IPersist == riid) 
+         || (IID_IPersistStreamInit == riid) )
+        {
             AddRef();
             *ppv = reinterpret_cast<LPVOID>(this);
             return NOERROR;
@@ -67,4 +69,3 @@ private:
 };
 
 #endif
-