From 03affdf4dd08a9e7441c9c0fc0c5db75d7c4a5c1 Mon Sep 17 00:00:00 2001 From: jtn Date: Sun, 5 Jan 2014 10:55:05 +0000 Subject: [PATCH] Fix segfault in SDL client help for improvements with non-tech prereqs. See gna bug #21433. git-svn-id: svn://svn.gna.org/svn/freeciv/branches/S2_5@24040 a0f10bec-cc02-0410-94fc-a9cfff90b4cd --- client/gui-sdl/helpdlg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/gui-sdl/helpdlg.c b/client/gui-sdl/helpdlg.c index acf8a551df..36c0bc5526 100644 --- a/client/gui-sdl/helpdlg.c +++ b/client/gui-sdl/helpdlg.c @@ -388,6 +388,9 @@ void popup_impr_info(Impr_type_id impr) pRequirementLabel2 = create_iconlabel_from_chars(NULL, pWindow->dst, universal_name_translation(&preq->source, buffer, sizeof(buffer)), adj_font(12), WF_RESTORE_BACKGROUND); + if (preq->source.kind != VUT_ADVANCE) { + break; /* FIXME */ + } pRequirementLabel2->ID = MAX_ID - advance_number(preq->source.value.advance); pRequirementLabel2->string16->fgcol = *get_tech_color(advance_number(preq->source.value.advance)); pRequirementLabel2->action = change_tech_callback; -- 2.11.4.GIT