summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-21 12:45:41 +0000
committertruelight <truelight@openttd.org>2007-06-21 12:45:41 +0000
commit1fa725ecae6826a7ccb72aa059988bb578648e20 (patch)
treedc3862171ce868f942f036e6a2feef59115594ab
parent3fa3d2e3653f351ba071152a4fa8ff19e31aa14f (diff)
downloadopenttd-1fa725ecae6826a7ccb72aa059988bb578648e20.tar.xz
(svn r10242) -Fix: avoid a segfault if you move your mouse at startup with 32bpp-anim
-rw-r--r--src/blitter/32bpp_anim.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/blitter/32bpp_anim.cpp b/src/blitter/32bpp_anim.cpp
index d207173d3..1ccd2b7a9 100644
--- a/src/blitter/32bpp_anim.cpp
+++ b/src/blitter/32bpp_anim.cpp
@@ -186,6 +186,8 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
uint32 *src = (uint32 *)video;
uint8 *anim_line;
+ if (this->anim_buf == NULL) return;
+
anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {