Check for NULL before doing IsEqualGUID().
This commit is contained in:
parent
aaa78f9cda
commit
34c9f9fb39
|
@ -316,9 +316,11 @@ HRESULT WINAPI DirectDrawCreate(
|
||||||
ddraw_drivers[drvindex] = NULL; /* mark this one as unusable */
|
ddraw_drivers[drvindex] = NULL; /* mark this one as unusable */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ||
|
if (lpGUID &&
|
||||||
|
(IsEqualGUID( &IID_IDirectDraw2, lpGUID ) ||
|
||||||
IsEqualGUID( &IID_IDirectDraw4, lpGUID ) ||
|
IsEqualGUID( &IID_IDirectDraw4, lpGUID ) ||
|
||||||
IsEqualGUID( &IID_IDirectDraw7, lpGUID )
|
IsEqualGUID( &IID_IDirectDraw7, lpGUID )
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
LPVOID x;
|
LPVOID x;
|
||||||
ret = IDirectDraw_QueryInterface(*lplpDD,lpGUID,&x);
|
ret = IDirectDraw_QueryInterface(*lplpDD,lpGUID,&x);
|
||||||
|
|
Loading…
Reference in New Issue