summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_watch.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 74d0c1f7d..ab00c38dc 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -94,6 +94,10 @@ class CommandWatch : public Command
{
/* Yup, is on my list */
watchlist::iterator n = wl->find(nick);
+
+ if (!wl)
+ return CMD_FAILURE;
+
if (n != wl->end())
{
if (!n->second.empty())
@@ -365,6 +369,7 @@ class Modulewatch : public Module
/* User's quitting, we're done with this. */
delete wl;
+ user->Shrink("watchlist");
}
}