Add guard clause needed...
...to prevent the code for preserving changed titles across a set_resolution() call from damaging the editor display.
This commit is contained in:
parent
a35eef9135
commit
0fa7406fc0
1 changed files with 2 additions and 2 deletions
|
@ -535,7 +535,7 @@ bool theme::set_resolution(const SDL_Rect& screen)
|
|||
|
||||
std::map<std::string,std::string> title_stash;
|
||||
for (std::vector<theme::menu>::iterator m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
if (!m->title().empty())
|
||||
if (!m->title().empty() && !m->get_id().empty())
|
||||
title_stash[m->get_id()] = m->title();
|
||||
}
|
||||
|
||||
|
@ -655,7 +655,7 @@ void theme::set_object_location(theme::object& element, std::string rect_str, st
|
|||
void theme::modify(const config* cfg){
|
||||
std::map<std::string,std::string> title_stash;
|
||||
for (std::vector<theme::menu>::iterator m = menus_.begin(); m != menus_.end(); ++m) {
|
||||
if (!m->title().empty())
|
||||
if (!m->title().empty() && !m->get_id().empty())
|
||||
title_stash[m->get_id()] = m->title();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue