Diffstat (limited to 'noncore/styles/theme/ogfxeffect.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/styles/theme/ogfxeffect.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/styles/theme/ogfxeffect.cpp b/noncore/styles/theme/ogfxeffect.cpp index 2071a67..90b45fe 100644 --- a/noncore/styles/theme/ogfxeffect.cpp +++ b/noncore/styles/theme/ogfxeffect.cpp @@ -24,15 +24,16 @@ //====================================================================== QPixmap& OGfxEffect::gradient(QPixmap &pixmap, const QColor &ca, const QColor &cb, GradientType eff, int ncols) { + if ( !pixmap. isNull ( )) { QImage image = gradient(pixmap.size(), ca, cb, eff, ncols); pixmap.convertFromImage(image); - + } return pixmap; } QImage OGfxEffect::gradient(const QSize &size, const QColor &ca, const QColor &cb, GradientType eff, int /*ncols*/) { @@ -277,20 +278,21 @@ QImage OGfxEffect::gradient(const QSize &size, const QColor &ca, QPixmap& OGfxEffect::blend(QPixmap &pixmap, float initial_intensity, const QColor &bgnd, GradientType eff, bool anti_dir, int /*ncols*/) { + if ( !pixmap. isNull ( )) { QImage image = pixmap.convertToImage(); OGfxEffect::blend(image, initial_intensity, bgnd, eff, anti_dir); if ( pixmap. depth ( ) <= 8 ) image. convertDepth ( pixmap. depth ( )); pixmap.convertFromImage(image); - + } return pixmap; } QImage& OGfxEffect::blend(QImage &image, float initial_intensity, const QColor &bgnd, GradientType eff, |