commit 5d5aaf08dc19d798f31cab139e1030918c1f62ac
parent dceafa37894c4e9c6a53a784288170ffc9c0fd66
Author: lumidify <nobody@lumidify.org>
Date:   Thu, 24 Dec 2020 22:17:17 +0100
Fix crash when destroying font
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ltkc.c b/ltkc.c
@@ -150,5 +150,6 @@ int main(int argc, char *argv[]) {
 		}
 	}
 
+	/* FIXME: close socket */
 	return 0;
 }
diff --git a/text_stb.c b/text_stb.c
@@ -205,7 +205,7 @@ ltk_init_text(const char *default_font, Display *dpy, int screen, Colormap cm) {
 void
 ltk_cleanup_text(void) {
 	for (int i = 0; i < tm.num_fonts; i++) {
-		ltk_destroy_font(&tm.fonts[i]);
+		ltk_destroy_font(tm.fonts[i]);
 	}
 	if (!tm.glyph_cache) return;
 	for (int k = kh_begin(tm.glyph_cache); k != kh_end(tm.glyph_cache); k++) {
@@ -335,7 +335,6 @@ ltk_create_font(char *path, uint16_t id, int index) {
 
 static void
 ltk_destroy_font(LtkFont *font) {
-	/* FIXME: why does this cause error? */
 	free(font->info.data);
 	free(font);
 }