author | zautrix <zautrix> | 2005-01-08 00:02:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-08 00:02:17 (UTC) |
commit | 430d67f339232b6cf745840eaa2aaceb14bdc8c7 (patch) (side-by-side diff) | |
tree | ec63659a3ce6a87d75d5d7b29e1c1cb1df33381a /korganizer | |
parent | 5e7c3e3e51fa939e97b73e6443089edcec8dc663 (diff) | |
download | kdepimpi-430d67f339232b6cf745840eaa2aaceb14bdc8c7.zip kdepimpi-430d67f339232b6cf745840eaa2aaceb14bdc8c7.tar.gz kdepimpi-430d67f339232b6cf745840eaa2aaceb14bdc8c7.tar.bz2 |
fix crash and to
-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 @@ -1633,5 +1633,5 @@ void KOAgenda::computeSizes() if ( mAllDayMode ) { 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 ); } else { diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 6965ba7..62281d4 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -428,5 +428,5 @@ QPixmap * KOAgendaItem::paintPix() static QPixmap* mPaintPix = 0; if ( ! mPaintPix ) - mPaintPix = new QPixmap(); + mPaintPix = new QPixmap(1,1); return mPaintPix ; } @@ -435,5 +435,5 @@ QPixmap * KOAgendaItem::paintPixAllday() static QPixmap* mPaintPixA = 0; if ( ! mPaintPixA ) - mPaintPixA = new QPixmap(); + mPaintPixA = new QPixmap(1,1); return mPaintPixA ; } @@ -442,5 +442,5 @@ QPixmap * KOAgendaItem::paintPixSel() static QPixmap* mPaintPixSel = 0; if ( ! mPaintPixSel ) - mPaintPixSel = new QPixmap(); + mPaintPixSel = new QPixmap(1,1); return mPaintPixSel ; } |