check for NULL pointer

svn path=/trunk/; revision=34425
This commit is contained in:
Christoph von Wittich 2008-07-11 15:15:42 +00:00
parent 1fa1b4e184
commit dfb10c4404

View file

@ -577,6 +577,11 @@ static HRESULT WINAPI IDirectSoundImpl_SetCooperativeLevel(
IDirectSoundImpl *This = (IDirectSoundImpl *)iface;
TRACE("(%p,%p,%s)\n",This,hwnd,dumpCooperativeLevel(level));
if (This->device == NULL) {
WARN("not initialized\n");
return DSERR_UNINITIALIZED;
}
if (level==DSSCL_PRIORITY || level==DSSCL_EXCLUSIVE) {
WARN("level=%s not fully supported\n",
level==DSSCL_PRIORITY ? "DSSCL_PRIORITY" : "DSSCL_EXCLUSIVE");