changeset 19123:5a1a75ac9403 draft

(svn r23980) -Fix (r23977): crash when starting with the 32bpp anim blitter
author rubidium <rubidium@openttd.org>
date Thu, 23 Feb 2012 21:10:08 +0000
parents e8a47fa6143e
children 6ba3a5f6850f
files src/video/sdl_v.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -261,15 +261,15 @@
 	Blitter *blitter = BlitterFactoryBase::GetCurrentBlitter();
 	blitter->PostResize();
 
+	InitPalette();
 	switch (blitter->UsePaletteAnimation()) {
 		case Blitter::PALETTE_ANIMATION_NONE:
 		case Blitter::PALETTE_ANIMATION_VIDEO_BACKEND:
-			InitPalette();
 			UpdatePalette();
 			break;
 
 		case Blitter::PALETTE_ANIMATION_BLITTER:
-			blitter->PaletteAnimate(_local_palette);
+			if (_video_driver != NULL) blitter->PaletteAnimate(_local_palette);
 			break;
 
 		default: