Fix crash in TGUI 9440CXI

This commit is contained in:
Jasmine Iwanek
2022-07-22 21:15:15 -04:00
parent 1ee4a12bce
commit 924408cf58

View File

@@ -3150,14 +3150,16 @@ static int tgui96xx_available(void)
void tgui_close(void *p) void tgui_close(void *p)
{ {
tgui_t *tgui = (tgui_t *)p; tgui_t *tgui = (tgui_t *)p;
svga_close(&tgui->svga); svga_close(&tgui->svga);
if (tgui->type >= TGUI_9440) {
ddc_close(tgui->ddc); ddc_close(tgui->ddc);
i2c_gpio_close(tgui->i2c); i2c_gpio_close(tgui->i2c);
};
free(tgui); free(tgui);
} }
void tgui_speed_changed(void *p) void tgui_speed_changed(void *p)