Permalink
Browse files

Fix CALLMOD, m_pNetwork could be NULL, in this case CALLMOD would be …

…passed a NULL network. But CALLMOD will try calling its modules anyway
  • Loading branch information...
1 parent e70b685 commit 75d7cdffd9542c6b5497a86adf4b6bb642dd9d39 @kylef kylef committed Aug 31, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 Client.cpp
View
@@ -16,8 +16,8 @@
#include "WebModules.h"
#define CALLMOD(MOD, CLIENT, USER, NETWORK, FUNC) { \
- CModule *pModule = (NETWORK)->GetModules().FindModule(MOD); \
- if (pModule) { \
+ CModule *pModule = NULL; \
+ if (NETWORK && (pModule = (NETWORK)->GetModules().FindModule(MOD))) { \
try { \
pModule->SetClient(CLIENT); \
pModule->FUNC; \

0 comments on commit 75d7cdf

Please sign in to comment.