From 1b944b4d10382d48f3d4d5a767413ccdcdb0b6a0 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 16 Sep 2023 19:35:04 +0300 Subject: [PATCH 11/11] Fix dead assignment in popup_intel_dialog() See osdn #48636 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/inteldlg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/gui-sdl2/inteldlg.c b/client/gui-sdl2/inteldlg.c index 84a2702606..1ee13afef6 100644 --- a/client/gui-sdl2/inteldlg.c +++ b/client/gui-sdl2/inteldlg.c @@ -176,12 +176,12 @@ static struct intel_dialog *create_intel_dialog(struct player *pPlayer) **************************************************************************/ void popup_intel_dialog(struct player *p) { - struct intel_dialog *pdialog; + struct intel_dialog *pdialog = get_intel_dialog(p); - if (!(pdialog = get_intel_dialog(p))) { - pdialog = create_intel_dialog(p); + if (pdialog == NULL) { + create_intel_dialog(p); } else { - /* bring existing dialog to front */ + /* Bring existing dialog to front */ select_window_group_dialog(pdialog->pdialog->pBeginWidgetList, pdialog->pdialog->pEndWidgetList); } -- 2.40.1