summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-26 13:21:25 +0000
committerrubidium <rubidium@openttd.org>2013-11-26 13:21:25 +0000
commit50fdf5e30cd59090fb6600f0fbae8888c43ca7ee (patch)
treee9cb57fc65007dd4336da4569225b91311e8c910 /src/smallmap_gui.cpp
parent945fccc706e6ea175e7a112fb78ce1217e7464d5 (diff)
downloadopenttd-50fdf5e30cd59090fb6600f0fbae8888c43ca7ee.tar.xz
(svn r26121) -Codechange: add some asserts after dynamic casts to show they shouldn't return NULL ever
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 85a123626..99097c571 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -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);