be careful with the to/from

svn path=/trunk/KDE/kdelibs/; revision=986690
This commit is contained in:
Aaron J. Seigo 2009-06-24 21:53:18 +00:00
parent 06efdd62fe
commit 970766d468

View File

@ -135,6 +135,10 @@ QPainterPath roundedRectangle(const QRectF &rect, qreal radius)
QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount) QPixmap transition(const QPixmap &from, const QPixmap &to, qreal amount)
{ {
if (from.isNull() || to.isNull()) {
return from;
}
int value = int(0xff * amount); int value = int(0xff * amount);
if (value == 0) { if (value == 0) {