mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 08:00:56 -04:00
Fixed OpenAL cloning bug
This commit is contained in:
parent
32966b80cb
commit
32a2d1650c
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user