(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 945fccc706
commit 50fdf5e30c
3 changed files with 10 additions and 2 deletions

View File

@@ -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;