From 3f54b2759ab1dc731f7e78a3437d12cb3b262a03 Mon Sep 17 00:00:00 2001 From: jsalmon3 <> Date: Sun, 28 Mar 2004 18:02:51 +0000 Subject: [PATCH] Only remove graphic from palette list if it's 8bit --- src/video/graphic.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/graphic.cpp b/src/video/graphic.cpp index b139eab94..033027fa4 100644 --- a/src/video/graphic.cpp +++ b/src/video/graphic.cpp @@ -496,7 +496,9 @@ global void ResizeGraphic(Graphic* g, int w, int h) SDL_UnlockSurface(g->Surface); memcpy(pal, g->Surface->format->palette->colors, sizeof(SDL_Color) * 256); - VideoPaletteListRemove(g->Surface); + if (graphic->Surface->format->BytesPerPixel == 1) { + VideoPaletteListRemove(g->Surface); + } ckey = g->Surface->format->colorkey; SDL_FreeSurface(g->Surface);