From 642fd965cca78fe4398cbe12afcd15cd2f2257ad Mon Sep 17 00:00:00 2001 From: harlekin Date: Mon, 05 Jan 2004 16:22:01 +0000 Subject: prevent segfaults --- 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 @@ -35,6 +35,8 @@ MailApplet::MailApplet( QWidget *parent, const char *name, WFlags fl ) hide(); + m_statusMail = 0; + connect( this, SIGNAL( clicked() ), SLOT( slotClicked() ) ); if ( !m_config->readBoolEntry( "Disabled", false ) ) { @@ -49,7 +51,7 @@ MailApplet::MailApplet( QWidget *parent, const char *name, WFlags fl ) } MailApplet::~MailApplet() { - delete m_statusMail; + if (m_statusMail) delete m_statusMail; } void MailApplet::drawButton(QPainter *) { } -- cgit v0.9.0.2