[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/runtime/kstyles/oxygen
From:       Huynh Huu Long <long.upcase () googlemail ! com>
Date:       2008-05-31 14:02:50
Message-ID: 1212242570.857398.1458.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 814863 by huynhhuu:

prevent an endless loop
BUG: 162415


 M  +4 -4      tileset.cpp  


--- trunk/KDE/kdebase/runtime/kstyles/oxygen/tileset.cpp #814862:814863
@@ -42,8 +42,8 @@
 
     _w3 = pix.width() - (w1 + w2);
     _h3 = pix.height() - (h1 + h2);
-    int w = w2; while (w < 32) w += w2;
-    int h = h2; while (h < 32) h += h2;
+    int w = w2; while (w < 32 && w2 > 0) w += w2;
+    int h = h2; while (h < 32 && h2 > 0) h += h2;
 
     initPixmap(0, pix, _w1, _h1, QRect(0,      0,      _w1, _h1));
     initPixmap(1, pix,  w,  _h1, QRect(_w1,    0,       w2, _h1));
@@ -64,8 +64,8 @@
 
     int x2 = pix.width() - _w3;
     int y2 = pix.height() - _h3;
-    int w = w2; while (w < 32) w += w2;
-    int h = h2; while (h < 32) h += h2;
+    int w = w2; while (w < 32 && w2 > 0) w += w2;
+    int h = h2; while (h < 32 && h2 > 0) h += h2;
 
     initPixmap(0, pix, _w1, _h1, QRect(0,  0,  _w1, _h1));
     initPixmap(1, pix,  w,  _h1, QRect(x1, 0,   w2, _h1));
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic