Fixed OpenAL cloning bug

This commit is contained in:
Nicolay Korslund 2010-09-10 10:57:30 +02:00
parent 32966b80cb
commit 32a2d1650c

View file

@ -364,7 +364,7 @@ OpenAL_Sound::OpenAL_Sound(ALuint buf, int *ref, OpenAL_Factory *fact)
{ {
// Increase the reference count // Increase the reference count
assert(ref != NULL); assert(ref != NULL);
*refCnt++; (*refCnt)++;
// Set up buffer // Set up buffer
bufferID[0] = buf; bufferID[0] = buf;
@ -469,7 +469,7 @@ OpenAL_Sound::~OpenAL_Sound()
owner->notifyDelete(this); owner->notifyDelete(this);
// Decrease the reference counter // Decrease the reference counter
if((-- *refCnt) == 0) if((-- (*refCnt)) == 0)
{ {
// We're the last owner. Delete the buffer(s) and the counter // We're the last owner. Delete the buffer(s) and the counter
// itself. // itself.