Couple small error handling fixups
This commit is contained in:
@@ -56,10 +56,10 @@ AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName)
|
||||
Context = GetContextRef();
|
||||
if(!Context) return AL_FALSE;
|
||||
|
||||
if(!extName)
|
||||
alSetError(Context, AL_INVALID_VALUE);
|
||||
else
|
||||
al_try
|
||||
{
|
||||
CHECK_VALUE(Context, extName);
|
||||
|
||||
len = strlen(extName);
|
||||
ptr = Context->ExtensionList;
|
||||
while(ptr && *ptr)
|
||||
@@ -78,6 +78,7 @@ AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName)
|
||||
}
|
||||
}
|
||||
}
|
||||
al_endtry;
|
||||
|
||||
ALCcontext_DecRef(Context);
|
||||
return ret;
|
||||
|
||||
+1
-2
@@ -699,8 +699,7 @@ AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, AL
|
||||
break;
|
||||
|
||||
default:
|
||||
alSetError(Context, AL_INVALID_ENUM);
|
||||
break;
|
||||
al_throwerr(Context, AL_INVALID_ENUM);
|
||||
}
|
||||
}
|
||||
al_endtry;
|
||||
|
||||
Reference in New Issue
Block a user