Avoid an assertion failure if haloes are disabled.

Moved the assertion after the test whether haloes are enabled, fixes
bug #14297.
This commit is contained in:
Mark de Wever 2009-09-14 19:34:41 +00:00
parent 5d73712360
commit 44b4e7a111
2 changed files with 2 additions and 1 deletions

View file

@ -42,6 +42,7 @@ Version 1.7.5+svn:
when victory_when_enemies_defeated="yes")
* Various cleanups to the gui2 code
* Remove position info from unit list
* Avoid an assertion failure if haloes are disabled (bug #14297)
Version 1.7.5:
* Campaigns:

View file

@ -324,10 +324,10 @@ void remove(int handle)
void unrender(std::set<map_location> invalidated_locations)
{
assert(invalidated_haloes.size() == 0);
if(preferences::show_haloes() == false || haloes.size() == 0) {
return;
}
assert(invalidated_haloes.size() == 0);
// Remove expired haloes
std::map<int, effect>::iterator itor = haloes.begin();