# HG changeset patch # User rubidium # Date 2007-03-25 00:13:22 # Node ID befc514fb4d4c291028b2a7ab873225597064990 # Parent 2ae1779bf3c1f983dd8e88e6132e0e086e177aaa (svn r9437) -Fix (r9420): dedicated server crashed when the y part of the resolution was less than 10. diff --git a/src/texteff.cpp b/src/texteff.cpp --- 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,