diff options
author | rubidium <rubidium@openttd.org> | 2013-11-26 13:21:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-26 13:21:25 +0000 |
commit | 50fdf5e30cd59090fb6600f0fbae8888c43ca7ee (patch) | |
tree | e9cb57fc65007dd4336da4569225b91311e8c910 /src/widgets | |
parent | 945fccc706e6ea175e7a112fb78ce1217e7464d5 (diff) | |
download | openttd-50fdf5e30cd59090fb6600f0fbae8888c43ca7ee.tar.xz |
(svn r26121) -Codechange: add some asserts after dynamic casts to show they shouldn't return NULL ever
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dropdown.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index 400514822..7da533a74 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -475,6 +475,7 @@ int HideDropDownMenu(Window *pw) if (w->window_class != WC_DROPDOWN_MENU) continue; DropdownWindow *dw = dynamic_cast<DropdownWindow*>(w); + assert(dw != NULL); if (pw->window_class == dw->parent_wnd_class && pw->window_number == dw->parent_wnd_num) { int parent_button = dw->parent_button; |