From 9e9634656790d72da59373c2f5ca33f676ec0b21 Mon Sep 17 00:00:00 2001 From: alegrand Date: Mon, 31 Jan 2005 20:54:48 +0000 Subject: [PATCH] aborting is cleaner than segfaulting git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@824 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/surf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/surf/surf.c b/src/surf/surf.c index 82cf6dbd99..2ff094e8a3 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -163,6 +163,8 @@ FILE *surf_fopen(const char *name, const char *mode) char* path = NULL; FILE *file = NULL; + xbt_assert1((name!=NULL), "Need a real file name, not \"%s\"\n",name); + xbt_assert0(surf_path,"surf_init has to be called before using surf_fopen"); if(!path_name) path_name=xbt_new0(char,strlen(name)+1); -- 2.20.1