mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-23 18:23:53 +00:00
Fixed OpenAL cloning bug
This commit is contained in:
parent
32966b80cb
commit
32a2d1650c
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue