diff options
author | rubidium <rubidium@openttd.org> | 2007-03-25 00:13:22 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-25 00:13:22 +0000 |
commit | 0a3719fb72de55f0535cc55a4aa2bfb52bedbd17 (patch) | |
tree | 6aa6f4ba853ecbbbfc96fb05a42a62cf1cbad3cb /src | |
parent | 0ceca4140a8e369f78ba310d45d587e7a88094b8 (diff) | |
download | openttd-0a3719fb72de55f0535cc55a4aa2bfb52bedbd17.tar.xz |
(svn r9437) -Fix (r9420): dedicated server crashed when the y part of the resolution was less than 10.
Diffstat (limited to 'src')
-rw-r--r-- | src/texteff.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/texteff.cpp b/src/texteff.cpp index 98b0dfc42..ed9e7c512 100644 --- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -156,6 +156,7 @@ void UndrawTextMessage() if (x + width >= _screen.width) { width = _screen.width - x; } + if (width <= 0 || height <= 0) return; _textmessage_visible = false; /* Put our 'shot' back to the screen */ @@ -220,6 +221,8 @@ void DrawTextMessage() if (x + width >= _screen.width) { width = _screen.width - x; } + if (width <= 0 || height <= 0) return; + /* Make a copy of the screen as it is before painting (for undraw) */ memcpy_pitch( _textmessage_backup, |