From 7c0a123aac26baae2b0f9fe28a2f6889b19af374 Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Mon, 4 Mar 2019 08:44:19 +0000 Subject: [PATCH] Correctly initialize the shared palette. Fixes #34 --- GL/texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GL/texture.c b/GL/texture.c index c82c462..dfa408d 100644 --- a/GL/texture.c +++ b/GL/texture.c @@ -154,6 +154,9 @@ GLubyte _glInitTextures() { named_array_reserve(&TEXTURE_OBJECTS, 0); SHARED_PALETTE = (TexturePalette*) malloc(sizeof(TexturePalette)); + SHARED_PALETTE->data = NULL; + SHARED_PALETTE->format = 0; + SHARED_PALETTE->width = 0; return 1; }