pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3290 - trunk/pingus/src/editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3290 - trunk/pingus/src/editor
Date: Sun, 21 Oct 2007 23:36:49 +0200

Author: grumbel
Date: 2007-10-21 23:36:48 +0200 (Sun, 21 Oct 2007)
New Revision: 3290

Modified:
   trunk/pingus/src/editor/editor_level.cpp
Log:
- fixed crash when invalid height is supplied

Modified: trunk/pingus/src/editor/editor_level.cpp
===================================================================
--- trunk/pingus/src/editor/editor_level.cpp    2007-10-18 23:17:15 UTC (rev 
3289)
+++ trunk/pingus/src/editor/editor_level.cpp    2007-10-21 21:36:48 UTC (rev 
3290)
@@ -432,6 +432,12 @@
 EditorLevel::set_size(const Size& s)
 {
   impl->size = s;
+
+  if (impl->size.width <= 0)
+    impl->size.width = 1;
+
+  if (impl->size.height <= 0)
+    impl->size.height = 1;
 }
 
 } // namespace Editor





reply via email to

[Prev in Thread] Current Thread [Next in Thread]