From 1845ed45620fd9fc65a16d8b29ee112e1320e143 Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Sun, 31 May 2009 01:39:07 +0000 Subject: [PATCH] Avoid dereferencing NULL underlying configs from vconfig objects... ...in the storyscreen WML resolver procedure. Fixes bug #13601. --- changelog | 1 + players_changelog | 3 +++ src/storyscreen/part.cpp | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/changelog b/changelog index 1cb99f2391b..20a0bfd84d1 100644 --- a/changelog +++ b/changelog @@ -16,6 +16,7 @@ Version 1.7.0+svn: * Miscellaneous and bugfixes: * Add strict compilation to cmake * Let cmake also use the CXXFLAGS and CFLAGS environment variables + * Fixed a segmentation fault with storyscreens using [if] Version 1.7.0: * AI: diff --git a/players_changelog b/players_changelog index 4ea4f68871a..b8b8efd783e 100644 --- a/players_changelog +++ b/players_changelog @@ -14,6 +14,9 @@ Version 1.7.0+svn: * User interface * Improved the layout to take less space in certain cases. + * Miscellaneous and bugfixes + * Fixed a crash in some storyscreens. + Version 1.7.0: * Campaigns * Delfador's Memoirs: new campaign added to mainline (Novice level, diff --git a/src/storyscreen/part.cpp b/src/storyscreen/part.cpp index a1fd093c39a..09cc53dbd61 100644 --- a/src/storyscreen/part.cpp +++ b/src/storyscreen/part.cpp @@ -164,6 +164,10 @@ part::TITLE_ALIGNMENT part::string_title_align(const std::string& s) void part::resolve_wml(const vconfig& cfg, game_state& gamestate) { + if(cfg.null()) { + return; + } + if(cfg.has_attribute("background")) { background_file_ = cfg["background"]; }