From: suter Date: Fri, 25 Feb 2011 09:02:16 +0000 (+0000) Subject: props dict does not always exists anymore. Check if not NULL before X-Git-Tag: v3.6_beta2~228 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/41058fa2ad8d53bfb3dfcbbb286665cd52f3cf62?ds=sidebyside props dict does not always exists anymore. Check if not NULL before asking for length git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9718 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/teshsuite/simdag/platforms/flatifier.c b/teshsuite/simdag/platforms/flatifier.c index 813c866cbd..eac56b11fc 100644 --- a/teshsuite/simdag/platforms/flatifier.c +++ b/teshsuite/simdag/platforms/flatifier.c @@ -84,7 +84,7 @@ int main(int argc, char **argv) SD_workstation_get_name(hosts[i]), SD_workstation_get_power(hosts[i])); props = SD_workstation_get_properties(hosts[i]); - if (xbt_dict_length(props) > 0) { + if (props && xbt_dict_length(props) > 0) { printf(">\n"); xbt_dict_foreach(props, cursor, key, data) { printf(" \n", key, data);