diff options
author | Chris Robinson <[email protected]> | 2018-01-28 23:32:28 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-28 23:32:28 -0800 |
commit | a042dbf30524429b49adb63efda35f53054ae924 (patch) | |
tree | 6e905d8173f2db6dd41b2e9cb471a9c860c54279 /Alc/backends/solaris.c | |
parent | 328fd7329d1ae1554452d2d4b0384173c0f47079 (diff) |
Call the backend close method in the destructor
Diffstat (limited to 'Alc/backends/solaris.c')
-rw-r--r-- | Alc/backends/solaris.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Alc/backends/solaris.c b/Alc/backends/solaris.c index 59cc5ddc..3230b401 100644 --- a/Alc/backends/solaris.c +++ b/Alc/backends/solaris.c @@ -90,9 +90,7 @@ static void ALCsolarisBackend_Construct(ALCsolarisBackend *self, ALCdevice *devi static void ALCsolarisBackend_Destruct(ALCsolarisBackend *self) { - if(self->fd != -1) - close(self->fd); - self->fd = -1; + ALCsolarisBackend_close(self); free(self->mix_data); self->mix_data = NULL; @@ -193,7 +191,8 @@ static ALCenum ALCsolarisBackend_open(ALCsolarisBackend *self, const ALCchar *na static void ALCsolarisBackend_close(ALCsolarisBackend *self) { - close(self->fd); + if(self->fd != -1) + close(self->fd); self->fd = -1; } |