[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [Konversation] 238cbc1: Channel can be null. Say you joined a channel
From:       "İsmail" "Dönmez" <ismail () kde ! org>
Date:       2010-07-01 13:27:51
Message-ID: 20100701132751.47092BB56FE () projects ! kde ! org
[Download RAW message or body]

commit 238cbc1f1dc71d7aed5d05d95e103be9cf0e7ef3
Author: İsmail Dönmez <ismail@kde.org>
Date:   Sat Aug 14 06:05:34 2004 +0000

    Channel can be null. Say you joined a channel and immediately get banned. So boom
    that channel no longer exists. So check if its null and save me one crash.
    
    svn path=/trunk/kdeextragear-2/konversation/; revision=337862

diff --git a/konversation/inputfilter.cpp b/konversation/inputfilter.cpp
index 5e2dae2..0a92ab4 100644
--- a/konversation/inputfilter.cpp
+++ b/konversation/inputfilter.cpp
@@ -469,7 +469,8 @@ mainWindow  // get rid of a compiler warning under KDE 3.0.x
     {
       server->nickJoinsChannel(channelName,sourceNick,sourceHostmask);
 #ifdef USE_KNOTIFY
-      if(server->getChannelByName(channelName)->notificationsEnabled()) {
+      Channel* channel = server->getChannelByName(channelName);
+      if(channel && server->getChannelByName(channelName)->notificationsEnabled()) {
         KNotifyClient::event(mainWindow->winId(), "join");
       }
 #endif
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic