From 29453e7cce40aa40726c3c31b0ce893fe18d6e1a Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Sat, 23 Oct 2004 21:16:21 +0000 Subject: [PATCH] Avoid crashing when trying to access info file. Patch by Richard Smith . SVN-Revision: 2056 --- src/level_subset.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/level_subset.cpp b/src/level_subset.cpp index 0d6d3ed7c..34d0565b4 100644 --- a/src/level_subset.cpp +++ b/src/level_subset.cpp @@ -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) -- 2.11.0