sprixel_free: close mstreamfp if it's open

This commit is contained in:
nick black 2021-07-25 06:53:07 -04:00
parent f67091794a
commit f9e24bbed4
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -42,6 +42,9 @@ void sprixel_debug(const sprixel* s, FILE* out){
void sprixel_free(sprixel* s){ void sprixel_free(sprixel* s){
if(s){ if(s){
loginfo("Destroying sprixel %u\n", s->id); loginfo("Destroying sprixel %u\n", s->id);
if(s->mstreamfp){
fclose(s->mstreamfp);
}
if(s->n){ if(s->n){
s->n->sprite = NULL; s->n->sprite = NULL;
} }