-rw-r--r-- | korganizer/koagenda.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 6 |
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 | |||
@@ -1631,9 +1631,9 @@ void KOAgenda::computeSizes() | |||
1631 | int cw = contentsWidth(); | 1631 | int cw = contentsWidth(); |
1632 | int ch = contentsHeight(); | 1632 | int ch = contentsHeight(); |
1633 | if ( mAllDayMode ) { | 1633 | if ( mAllDayMode ) { |
1634 | QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); | 1634 | QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); |
1635 | if ( paintPixAll->width() < cw || paintPixAll->height() < ch ) | 1635 | if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) |
1636 | paintPixAll->resize( cw, ch ); | 1636 | paintPixAll->resize( cw, ch ); |
1637 | } else { | 1637 | } else { |
1638 | QPixmap* paintPix = KOAgendaItem::paintPix(); | 1638 | QPixmap* paintPix = KOAgendaItem::paintPix(); |
1639 | if ( paintPix->width() < cw || paintPix->height() < ch ) | 1639 | if ( paintPix->width() < cw || paintPix->height() < ch ) |
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 6965ba7..62281d4 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -426,23 +426,23 @@ void KOAgendaItem::resizePixmap( int w , int h ) | |||
426 | QPixmap * KOAgendaItem::paintPix() | 426 | QPixmap * KOAgendaItem::paintPix() |
427 | { | 427 | { |
428 | static QPixmap* mPaintPix = 0; | 428 | static QPixmap* mPaintPix = 0; |
429 | if ( ! mPaintPix ) | 429 | if ( ! mPaintPix ) |
430 | mPaintPix = new QPixmap(); | 430 | mPaintPix = new QPixmap(1,1); |
431 | return mPaintPix ; | 431 | return mPaintPix ; |
432 | } | 432 | } |
433 | QPixmap * KOAgendaItem::paintPixAllday() | 433 | QPixmap * KOAgendaItem::paintPixAllday() |
434 | { | 434 | { |
435 | static QPixmap* mPaintPixA = 0; | 435 | static QPixmap* mPaintPixA = 0; |
436 | if ( ! mPaintPixA ) | 436 | if ( ! mPaintPixA ) |
437 | mPaintPixA = new QPixmap(); | 437 | mPaintPixA = new QPixmap(1,1); |
438 | return mPaintPixA ; | 438 | return mPaintPixA ; |
439 | } | 439 | } |
440 | QPixmap * KOAgendaItem::paintPixSel() | 440 | QPixmap * KOAgendaItem::paintPixSel() |
441 | { | 441 | { |
442 | static QPixmap* mPaintPixSel = 0; | 442 | static QPixmap* mPaintPixSel = 0; |
443 | if ( ! mPaintPixSel ) | 443 | if ( ! mPaintPixSel ) |
444 | mPaintPixSel = new QPixmap(); | 444 | mPaintPixSel = new QPixmap(1,1); |
445 | return mPaintPixSel ; | 445 | return mPaintPixSel ; |
446 | } | 446 | } |
447 | void KOAgendaItem::paintEvent ( QPaintEvent *e ) | 447 | void KOAgendaItem::paintEvent ( QPaintEvent *e ) |
448 | { | 448 | { |