Ignore:
Timestamp:
1999-12-13T15:44:23+13:00 (24 years ago)
Author:
davidb
Message:

Better protection when accessing "haschildren"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/vlistbrowserclass.cpp

    r752 r824  
    2828/*
    2929   $Log$
     30   Revision 1.6  1999/12/13 02:44:23  davidb
     31   Better protection when accessing "haschildren"
     32
    3033   Revision 1.5  1999/10/30 23:01:24  sjboddie
    3134   tidied things up slightly
     
    174177  link = "<a href=\"_httpdocument_" + collink;
    175178  icon = "_document:icontext_";
    176   int haschildren = section.metadata["haschildren"].values[0].getint();
    177   const text_t doctype = section.metadata["doctype"].values[0];
     179  int haschildren = 0;
     180
     181  if (section.metadata.count("haschildren")>0)
     182    {
     183      haschildren = section.metadata["haschildren"].values[0].getint();
     184    }
     185
     186  text_t doctype = "";
     187  if (section.metadata.count("doctype")>0)
     188    {
     189      doctype = section.metadata["doctype"].values[0];
     190    }
    178191
    179192  text_t &arg_d = args["d"];
Note: See TracChangeset for help on using the changeset viewer.