From 380959028319a107dddf91fbfd022aaec4834adb Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 16 Sep 2023 19:32:23 +0300 Subject: [PATCH 21/21] sdl2: 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 d11506884e..b632b83290 100644 --- a/client/gui-sdl2/inteldlg.c +++ b/client/gui-sdl2/inteldlg.c @@ -177,12 +177,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->begin_widget_list, pdialog->pdialog->end_widget_list); } -- 2.40.1