summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-02-23 21:10:08 +0000
committerrubidium <rubidium@openttd.org>2012-02-23 21:10:08 +0000
commit74785478ec78cda428d607f6f18b9665bb9896f1 (patch)
tree5f22b4cd735ff4f2e2f6334e175be4b1d3dc3dec /src
parent2015e3236171d55a40149dc7f2d95dcb4f0153fc (diff)
downloadopenttd-74785478ec78cda428d607f6f18b9665bb9896f1.tar.xz
(svn r23980) -Fix (r23977): crash when starting with the 32bpp anim blitter
Diffstat (limited to 'src')
-rw-r--r--src/video/sdl_v.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index bce7340f6..34d31212e 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -261,15 +261,15 @@ static bool CreateMainSurface(uint w, uint h)
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: