SUBST: Dynamicaly generate contexts
[citadel.git] / webcit / iconbar.c
index 53dead7a2bbe9d5b2d796a082f83a64fb60a6171..510fbca84c048b23b96f1a68124faf341d255c5b 100644 (file)
@@ -5,17 +5,11 @@
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License, version 3.
- * 
- * 
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * 
- * 
- * 
  */
 
 #include "webcit.h"
@@ -221,11 +215,12 @@ void tmplput_iconbar(StrBuf *Target, WCTemplputParams *TP)
 {
        wcsession *WCC = WC;
        
-        if (   (WCC != NULL)
-               && (    (WCC->logged_in)
-                       || (WCC->serv_info->serv_supports_guest)
-               )
-       ) {
+        if ( (WCC != NULL)     &&
+             ((WCC->logged_in) ||
+             ((WCC->serv_info != NULL) &&
+              (WCC->serv_info->serv_supports_guest))
+                     ) )
+        {
                DoTemplate(HKEY("iconbar"), NULL, &NoCtx);
        }
 }