texteff.c
branch0.5
changeset 5481 acf12c0e6f31
parent 5477 db92b7f416d3
--- a/texteff.c	Mon Mar 26 00:20:22 2007 +0000
+++ b/texteff.c	Tue Apr 10 09:40:36 2007 +0000
@@ -152,6 +152,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
@@ -219,6 +220,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,