From: Wilfried Goesgens Date: Thu, 10 Mar 2011 07:43:56 +0000 (+0100) Subject: Fix Crash; don't access pointers before checking them for NULL X-Git-Tag: v8.11~833 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=60a1a07903435fcbbbfe4ed580dd6606a0e15786 Fix Crash; don't access pointers before checking them for NULL --- diff --git a/webcit/webcit.c b/webcit/webcit.c index 4b317d935..20b4896d2 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -872,7 +872,9 @@ SKIP_ALL_THIS_CRAP: * Display the appropriate landing page for this site. */ void display_default_landing_page(void) { - if (WC->serv_info->serv_supports_guest) { + wcsession *WCC = WC; + + if (WCC && WCC->serv_info && WCC->serv_info->serv_supports_guest) { /* default action. probably revisit this. */ StrBuf *teh_lobby = NewStrBufPlain(HKEY("_BASEROOM_")); smart_goto(teh_lobby);