fix potential segfault

develop
Dan Amlund 2018-05-11 17:48:19 +02:00
parent d51a1d700c
commit 759df34fce
1 changed files with 1 additions and 1 deletions

@ -955,7 +955,7 @@ df::unit *Gui::getAnyUnit(df::viewscreen *top)
if (VIRTUAL_CAST_VAR(screen, df::viewscreen_announcelistst, top)) if (VIRTUAL_CAST_VAR(screen, df::viewscreen_announcelistst, top))
{ {
if (screen->unit) { if (world && screen->unit) {
// in (r)eports -> enter // in (r)eports -> enter
auto *report = vector_get(screen->reports, screen->sel_idx); auto *report = vector_get(screen->reports, screen->sel_idx);
if (report) if (report)