From cd6719df13e7c94278522fa6d4f542fe065e4a75 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 10 Mar 2011 08:43:56 +0100 Subject: [PATCH] Fix Crash; don't access pointers before checking them for NULL --- webcit/webcit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.30.2