(svn r26121) -Codechange: add some asserts after dynamic casts to show they shouldn't return NULL ever

This commit is contained in:
rubidium
2013-11-26 13:21:25 +00:00
parent 0e6e408cd3
commit 519cb3e103
3 changed files with 10 additions and 2 deletions

View File

@@ -1644,6 +1644,7 @@ public:
bar->SetupSmallestSize(w, init_array);
this->smallmap_window = dynamic_cast<SmallMapWindow *>(w);
assert(this->smallmap_window != NULL);
this->smallest_x = max(display->smallest_x, bar->smallest_x + smallmap_window->GetMinLegendWidth());
this->smallest_y = display->smallest_y + max(bar->smallest_y, smallmap_window->GetLegendHeight(smallmap_window->min_number_of_columns));
this->fill_x = max(display->fill_x, bar->fill_x);