aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/mmdevapi.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-02 10:47:31 -0700
committerChris Robinson <[email protected]>2014-05-02 10:47:31 -0700
commit3bdb3f9db7e37fc81a0b72a39c2c248000add53f (patch)
tree08d7966b67905f7417559f4816007f902e391144 /Alc/backends/mmdevapi.c
parentd90f684f162d4b91a58b61bb2a60ec1257c1dd70 (diff)
Iniitialize some mmdevapi backend fields in the constructor
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r--Alc/backends/mmdevapi.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c
index 4061105c..d732c3e1 100644
--- a/Alc/backends/mmdevapi.c
+++ b/Alc/backends/mmdevapi.c
@@ -438,10 +438,33 @@ static void ALCmmdevPlayback_Construct(ALCmmdevPlayback *self, ALCdevice *device
SET_VTABLE2(ALCmmdevPlayback, ALCmmdevProxy, self);
ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device);
ALCmmdevProxy_Construct(STATIC_CAST(ALCmmdevProxy, self));
+
+ self->devid = NULL;
+
+ self->mmdev = NULL;
+ self->client = NULL;
+ self->render = NULL;
+ self->NotifyEvent = NULL;
+
+ self->MsgEvent = NULL;
+
+ self->Padding = 0;
+
+ self->killNow = 0;
}
static void ALCmmdevPlayback_Destruct(ALCmmdevPlayback *self)
{
+ if(self->NotifyEvent != NULL)
+ CloseHandle(self->NotifyEvent);
+ self->NotifyEvent = NULL;
+ if(self->MsgEvent != NULL)
+ CloseHandle(self->MsgEvent);
+ self->MsgEvent = NULL;
+
+ free(self->devid);
+ self->devid = NULL;
+
ALCmmdevProxy_Destruct(STATIC_CAST(ALCmmdevProxy, self));
ALCbackend_Destruct(STATIC_CAST(ALCbackend, self));
}