From 675e1ff48db3a4c4693ff8bdfd8b377a0b0ebba7 Mon Sep 17 00:00:00 2001 From: sebastien Date: Mon, 5 Oct 2015 15:49:37 +0100 Subject: [PATCH] [[ WinServer crash ]] Initialise t_max_distance_display in getnearestdisplay This was causing crashes on server (which do not have display) --- engine/src/uidc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/src/uidc.cpp b/engine/src/uidc.cpp index f86c8f1e309..ac5f69df139 100644 --- a/engine/src/uidc.cpp +++ b/engine/src/uidc.cpp @@ -505,6 +505,7 @@ const MCDisplay *MCUIDC::getnearestdisplay(const MCRectangle& p_rectangle) t_max_area = 0; t_max_distance = MAXUINT4; + t_max_distance_index = 0; for(uint4 t_display = 0; t_display < t_display_count; ++t_display) { MCRectangle t_workarea;