summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagenda.cpp2
-rw-r--r--korganizer/koagendaitem.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index eb3791e..7e0b216 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -1634,3 +1634,3 @@ void KOAgenda::computeSizes()
QPixmap* paintPixAll = KOAgendaItem::paintPixAllday();
- if ( paintPixAll->width() < cw || paintPixAll->height() < ch )
+ if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 )
paintPixAll->resize( cw, ch );
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 6965ba7..62281d4 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -429,3 +429,3 @@ QPixmap * KOAgendaItem::paintPix()
if ( ! mPaintPix )
- mPaintPix = new QPixmap();
+ mPaintPix = new QPixmap(1,1);
return mPaintPix ;
@@ -436,3 +436,3 @@ QPixmap * KOAgendaItem::paintPixAllday()
if ( ! mPaintPixA )
- mPaintPixA = new QPixmap();
+ mPaintPixA = new QPixmap(1,1);
return mPaintPixA ;
@@ -443,3 +443,3 @@ QPixmap * KOAgendaItem::paintPixSel()
if ( ! mPaintPixSel )
- mPaintPixSel = new QPixmap();
+ mPaintPixSel = new QPixmap(1,1);
return mPaintPixSel ;