From 464ef9e74bdf2c9ca672371da2defc6b8161c92a Mon Sep 17 00:00:00 2001 From: Shengyu Zhang Date: Wed, 5 Dec 2018 00:59:42 +0800 Subject: [PATCH] Fix crash when auto update is off Since 2696ac134ce08accc9a0266ee525596222fff57, whether to include auto update related code should only control by macro CONF_AUTOUPDATE. This commit should fix #1374 --- src/game/client/components/menus_browser.cpp | 2 +- src/game/client/components/menus_settings.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/menus_browser.cpp b/src/game/client/components/menus_browser.cpp index 464a0ae30..c9cb19711 100644 --- a/src/game/client/components/menus_browser.cpp +++ b/src/game/client/components/menus_browser.cpp @@ -1296,7 +1296,7 @@ void CMenus::RenderServerbrowser(CUIRect MainView) StatusBox.HSplitTop(5.0f, 0, &StatusBox); // version note -#if defined(CONF_FAMILY_WINDOWS) || (defined(CONF_PLATFORM_LINUX) && !defined(__ANDROID__)) +#if defined(CONF_AUTO_UPDATE) CUIRect Part; StatusBox.HSplitBottom(15.0f, &StatusBox, &Button); char aBuf[64]; diff --git a/src/game/client/components/menus_settings.cpp b/src/game/client/components/menus_settings.cpp index 3dda8f208..cebbab6a6 100644 --- a/src/game/client/components/menus_settings.cpp +++ b/src/game/client/components/menus_settings.cpp @@ -2192,7 +2192,7 @@ void CMenus::RenderSettingsDDNet(CUIRect MainView) } // Updater -#if defined(CONF_FAMILY_WINDOWS) || (defined(CONF_PLATFORM_LINUX) && !defined(__ANDROID__)) +#if defined(CONF_AUTOUPDATE) { Left.HSplitTop(20.0f, &Label, &Left); bool NeedUpdate = str_comp(Client()->LatestVersion(), "0");