From 41058fa2ad8d53bfb3dfcbbb286665cd52f3cf62 Mon Sep 17 00:00:00 2001 From: suter Date: Fri, 25 Feb 2011 09:02:16 +0000 Subject: [PATCH] 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 --- teshsuite/simdag/platforms/flatifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.20.1