From 759df34fceb17e02333a779f76d4c74639e7a994 Mon Sep 17 00:00:00 2001 From: Dan Amlund Date: Fri, 11 May 2018 17:48:19 +0200 Subject: [PATCH] fix potential segfault --- library/modules/Gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index fe8333c41..758395f40 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -955,7 +955,7 @@ df::unit *Gui::getAnyUnit(df::viewscreen *top) if (VIRTUAL_CAST_VAR(screen, df::viewscreen_announcelistst, top)) { - if (screen->unit) { + if (world && screen->unit) { // in (r)eports -> enter auto *report = vector_get(screen->reports, screen->sel_idx); if (report)