Avoid crashing when trying to access info file.
authorRicardo Cruz <rick2@aeiou.pt>
Sat, 23 Oct 2004 21:16:21 +0000 (21:16 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Sat, 23 Oct 2004 21:16:21 +0000 (21:16 +0000)
Patch by Richard Smith <supertux@metafoo.co.uk>.

SVN-Revision: 2056

src/level_subset.cpp

index 0d6d3ed..34d0565 100644 (file)
@@ -59,6 +59,8 @@ void LevelSubset::create(const std::string& subset_name)
 void LevelSubset::read_info_file(const std::string& info_file)
 {
   lisp_object_t* root_obj = lisp_read_from_file(info_file);
+  if (root_obj == NULL)
+    return;
   lisp_object_t* cur = lisp_car(root_obj);
 
   if (lisp_symbol_p(cur) && strcmp(lisp_symbol(cur), "supertux-level-subset") == 0)