diff options
Diffstat (limited to 'Alc/backends/sndio.c')
-rw-r--r-- | Alc/backends/sndio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/backends/sndio.c b/Alc/backends/sndio.c index 47e05353..436baf26 100644 --- a/Alc/backends/sndio.c +++ b/Alc/backends/sndio.c @@ -77,9 +77,7 @@ static void ALCsndioBackend_Construct(ALCsndioBackend *self, ALCdevice *device) static void ALCsndioBackend_Destruct(ALCsndioBackend *self) { - if(self->sndHandle) - sio_close(self->sndHandle); - self->sndHandle = NULL; + ALCsndioBackend_close(self); al_free(self->mix_data); self->mix_data = NULL; @@ -152,7 +150,8 @@ static ALCenum ALCsndioBackend_open(ALCsndioBackend *self, const ALCchar *name) static void ALCsndioBackend_close(ALCsndioBackend *self) { - sio_close(self->sndHandle); + if(self->sndHandle) + sio_close(self->sndHandle); self->sndHandle = NULL; } |