Check for NULL before doing IsEqualGUID().

This commit is contained in:
Marcus Meissner 2000-12-16 20:17:22 +00:00 committed by Alexandre Julliard
parent aaa78f9cda
commit 34c9f9fb39

View File

@ -316,9 +316,11 @@ HRESULT WINAPI DirectDrawCreate(
ddraw_drivers[drvindex] = NULL; /* mark this one as unusable */
}
if (IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ||
IsEqualGUID( &IID_IDirectDraw4, lpGUID ) ||
IsEqualGUID( &IID_IDirectDraw7, lpGUID )
if (lpGUID &&
(IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ||
IsEqualGUID( &IID_IDirectDraw4, lpGUID ) ||
IsEqualGUID( &IID_IDirectDraw7, lpGUID )
)
) {
LPVOID x;
ret = IDirectDraw_QueryInterface(*lplpDD,lpGUID,&x);