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

List:       kde-commits
Subject:    kdelibs/kdecore
From:       Leo Savernik <l.savernik () aon ! at>
Date:       2005-04-21 18:03:12
Message-ID: 20050421180312.D7CA8651 () office ! kde ! org
[Download RAW message or body]

CVS commit by savernik: 

Don't divide by zero.

This fixes a crash in kopete 0.9, and also seems to fix a crash in akregator.

Forward port.

BUG: 101577


  M +1 -1      kstringhandler.cpp   1.40


--- kdelibs/kdecore/kstringhandler.cpp  #1.39:1.40
@@ -400,5 +400,5 @@ QString KStringHandler::rPixelSqueeze(co
     {
       int length = tmp.length();
-      int delta = (nameWidth - maxPixels) / em;
+      int delta = em ? (nameWidth - maxPixels) / em : length;
       delta = kClamp(delta, 1, length) ;
 


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

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