src/texteff.cpp
branchgamebalance
changeset 9907 3b068c3a1c74
parent 9906 6f41b8713b65
child 9908 0fa543611bbe
--- a/src/texteff.cpp	Thu Apr 19 14:43:25 2007 +0000
+++ b/src/texteff.cpp	Thu Apr 19 14:48:10 2007 +0000
@@ -156,6 +156,7 @@
 		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 @@
 	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,