author | zecke <zecke> | 2002-09-10 13:54:23 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 13:54:23 (UTC) |
commit | 4aad041a733e2478ff29330e1544e5fefcfb5cde (patch) (unidiff) | |
tree | d45f21fa4570037b516ebfc1dd95aac56b3e6660 | |
parent | 9ae3234e770008c4fac9dc69ffc9bb0cb0f1b2ae (diff) | |
download | opie-4aad041a733e2478ff29330e1544e5fefcfb5cde.zip opie-4aad041a733e2478ff29330e1544e5fefcfb5cde.tar.gz opie-4aad041a733e2478ff29330e1544e5fefcfb5cde.tar.bz2 |
Fix floating point exception divide by 0 in qpedecoration
-rw-r--r-- | library/qpedecoration_qws.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index 222d906..c2eb751 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp | |||
@@ -107,7 +107,8 @@ public: | |||
107 | 107 | ||
108 | static QImage scaleButton( const QImage &img, int height ) | 108 | static QImage scaleButton( const QImage &img, int height ) |
109 | { | 109 | { |
110 | if ( img.height() != height ) { | 110 | qWarning("Height %d %d", height, img.height() ); |
111 | if ( img.height()!=0 && img.height() != height ) { | ||
111 | return img.smoothScale( img.width()*height/img.height(), height ); | 112 | return img.smoothScale( img.width()*height/img.height(), height ); |
112 | } else { | 113 | } else { |
113 | return img; | 114 | return img; |