summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-01-08 00:02:17 (UTC)
committer zautrix <zautrix>2005-01-08 00:02:17 (UTC)
commit430d67f339232b6cf745840eaa2aaceb14bdc8c7 (patch) (side-by-side diff)
treeec63659a3ce6a87d75d5d7b29e1c1cb1df33381a /korganizer
parent5e7c3e3e51fa939e97b73e6443089edcec8dc663 (diff)
downloadkdepimpi-430d67f339232b6cf745840eaa2aaceb14bdc8c7.zip
kdepimpi-430d67f339232b6cf745840eaa2aaceb14bdc8c7.tar.gz
kdepimpi-430d67f339232b6cf745840eaa2aaceb14bdc8c7.tar.bz2
fix crash and to
Diffstat (limited to 'korganizer') (more/less context) (show 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
@@ -1632,7 +1632,7 @@ void KOAgenda::computeSizes()
int ch = contentsHeight();
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 {
QPixmap* paintPix = KOAgendaItem::paintPix();
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 6965ba7..62281d4 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -427,21 +427,21 @@ QPixmap * KOAgendaItem::paintPix()
{
static QPixmap* mPaintPix = 0;
if ( ! mPaintPix )
- mPaintPix = new QPixmap();
+ mPaintPix = new QPixmap(1,1);
return mPaintPix ;
}
QPixmap * KOAgendaItem::paintPixAllday()
{
static QPixmap* mPaintPixA = 0;
if ( ! mPaintPixA )
- mPaintPixA = new QPixmap();
+ mPaintPixA = new QPixmap(1,1);
return mPaintPixA ;
}
QPixmap * KOAgendaItem::paintPixSel()
{
static QPixmap* mPaintPixSel = 0;
if ( ! mPaintPixSel )
- mPaintPixSel = new QPixmap();
+ mPaintPixSel = new QPixmap(1,1);
return mPaintPixSel ;
}
void KOAgendaItem::paintEvent ( QPaintEvent *e )