From: Ricardo Cruz Date: Sat, 23 Oct 2004 21:16:21 +0000 (+0000) Subject: Avoid crashing when trying to access info file. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=29453e7cce40aa40726c3c31b0ce893fe18d6e1a;p=supertux.git Avoid crashing when trying to access info file. Patch by Richard Smith . SVN-Revision: 2056 --- 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)