-rw-r--r-- | noncore/net/mail/taskbarapplet/mailapplet.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/net/mail/taskbarapplet/mailapplet.cpp b/noncore/net/mail/taskbarapplet/mailapplet.cpp index f81dce8..31d5bfe 100644 --- a/noncore/net/mail/taskbarapplet/mailapplet.cpp +++ b/noncore/net/mail/taskbarapplet/mailapplet.cpp @@ -32,12 +32,14 @@ MailApplet::MailApplet( QWidget *parent, const char *name, WFlags fl ) layout->addWidget( pixmap ); layout->addItem( new QSpacerItem( 0,0 ) ); hide(); + m_statusMail = 0; + connect( this, SIGNAL( clicked() ), SLOT( slotClicked() ) ); if ( !m_config->readBoolEntry( "Disabled", false ) ) { m_intervalMs = m_config->readNumEntry( "CheckEvery", 5 ) * 60000; m_intervalTimer = new QTimer(); m_intervalTimer->start( m_intervalMs ); @@ -46,13 +48,13 @@ MailApplet::MailApplet( QWidget *parent, const char *name, WFlags fl ) // delay 5 sec until the whole mail backend gets started .-) QTimer::singleShot( 5000, this, SLOT( startup() ) ); } } MailApplet::~MailApplet() { - delete m_statusMail; + if (m_statusMail) delete m_statusMail; } void MailApplet::drawButton(QPainter *) { } void MailApplet::drawButtonText(QPainter *) { } void MailApplet::slotClicked() { |