gui1: Restore saved games info count test,
...preventing a segmentation fault when deleting all saved games in the Load Game dialog This is a trunk-specific regression. The test is intact in 1.10.
This commit is contained in:
parent
f80c7042bc
commit
3771d25656
3 changed files with 12 additions and 0 deletions
|
@ -4,6 +4,9 @@ Version 1.11.0+svn:
|
|||
* Keep a spawned unit from disappearing on reload in scenario 6b
|
||||
* Language and i18n:
|
||||
* Updated translations:
|
||||
* Miscellaneous and bug fixes:
|
||||
* Fix invalid memory access crash resulting from deleting all saved games
|
||||
in the Load Game dialog
|
||||
|
||||
Version 1.11.0:
|
||||
* Add-ons client:
|
||||
|
|
|
@ -11,6 +11,10 @@ Version 1.11.0+svn:
|
|||
* New translation: Ukrainian.
|
||||
* Updated translations:
|
||||
|
||||
* Miscellaneous and bug fixes:
|
||||
* Fix invalid memory access crash resulting from deleting all saved games
|
||||
in the Load Game dialog.
|
||||
|
||||
|
||||
Version 1.11.0:
|
||||
* Add-ons client:
|
||||
|
|
|
@ -348,6 +348,10 @@ private:
|
|||
|
||||
void save_preview_pane::draw_contents()
|
||||
{
|
||||
if(size_t(index_) >= info_->size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
surface screen = video().getSurface();
|
||||
|
||||
SDL_Rect const &loc = location();
|
||||
|
@ -361,6 +365,7 @@ void save_preview_pane::draw_contents()
|
|||
int ypos = area.y;
|
||||
|
||||
bool have_leader_image = false;
|
||||
|
||||
const config& summary = ((*info_)[index_]).summary();
|
||||
const std::string& leader_image = summary["leader_image"].str();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue