summaryrefslogtreecommitdiff
authorzecke <zecke>2002-09-10 13:54:23 (UTC)
committer zecke <zecke>2002-09-10 13:54:23 (UTC)
commit4aad041a733e2478ff29330e1544e5fefcfb5cde (patch) (side-by-side diff)
treed45f21fa4570037b516ebfc1dd95aac56b3e6660
parent9ae3234e770008c4fac9dc69ffc9bb0cb0f1b2ae (diff)
downloadopie-4aad041a733e2478ff29330e1544e5fefcfb5cde.zip
opie-4aad041a733e2478ff29330e1544e5fefcfb5cde.tar.gz
opie-4aad041a733e2478ff29330e1544e5fefcfb5cde.tar.bz2
Fix floating point exception divide by 0 in qpedecoration
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/qpedecoration_qws.cpp3
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
@@ -102,17 +102,18 @@ public:
bool needsOk() {
return (getWState() & WState_Reserved1 ) ||
(inherits( "QDialog" ) && !inherits( "QMessageBox" ) );
}
};
static QImage scaleButton( const QImage &img, int height )
{
- if ( img.height() != height ) {
+ qWarning("Height %d %d", height, img.height() );
+ if ( img.height()!=0 && img.height() != height ) {
return img.smoothScale( img.width()*height/img.height(), height );
} else {
return img;
}
}
class TLWidget : public QWidget
{