]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fixed another segfault in m_spanningtree's FJOIN (forgot to check if the channel...
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 28 Sep 2006 19:05:35 +0000 (19:05 +0000)
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 28 Sep 2006 19:05:35 +0000 (19:05 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5354 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index a1df169e1990abde4a2623e5ccae40121741eebd..33b3e2bdb654f4e2a95dad85381e998204c947d3 100644 (file)
@@ -1545,9 +1545,7 @@ class TreeSocket : public InspSocket
                time_t ourTS = time(NULL)+600;
                chanrec* us = this->Instance->FindChan(channel);
                if (us)
-               {
                        ourTS = us->age;
-               }
 
                /* XXX: PAY ATTENTION:
                 * In 1.1, if they have the newer channel, we immediately clear
@@ -1560,7 +1558,8 @@ class TreeSocket : public InspSocket
                {
                        Instance->Log(DEBUG,"FJOIN detected, our TS=%lu, their TS=%lu",ourTS,TS);
                        std::deque<std::string> param_list;
-                       us->age = TS;
+                       if (us)
+                               us->age = TS;
                        ourTS = TS;
                        param_list.push_back(chan->name);
                        Instance->Log(DEBUG,"REMOVE ALL STATUS MODES FROM OUR USERS *NOW*");