Make sure the device handle is valid when getting the device error

This commit is contained in:
Chris Robinson
2010-01-09 03:25:13 -08:00
parent 3d11fb219e
commit d61f90a9c2
+1 -1
View File
@@ -766,7 +766,7 @@ ALCAPI ALCenum ALCAPIENTRY alcGetError(ALCdevice *device)
{
ALCenum errorCode = ALC_NO_ERROR;
if(device)
if(IsDevice(device))
{
errorCode = device->LastError;
device->LastError = ALC_NO_ERROR;