From 3607bdc369b5731fc4be624a8d7756ff01d9f6b5 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Fri, 13 Jul 2018 01:34:45 +0500 Subject: [PATCH] xrGame/GamePersistent.cpp: dedicated server crash fix xrNetServer/ip_filter.cpp: replaced size() == 0 with empty() --- src/xrGame/GamePersistent.cpp | 3 ++- src/xrNetServer/ip_filter.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xrGame/GamePersistent.cpp b/src/xrGame/GamePersistent.cpp index 93173f5ce88..ba63566615b 100644 --- a/src/xrGame/GamePersistent.cpp +++ b/src/xrGame/GamePersistent.cpp @@ -159,7 +159,8 @@ CGamePersistent::~CGamePersistent(void) void CGamePersistent::PreStart(LPCSTR op) { - pApp->SetLoadingScreen(new UILoadingScreen()); + if (!GEnv.isDedicatedServer) + pApp->SetLoadingScreen(new UILoadingScreen()); inherited::PreStart(op); } diff --git a/src/xrNetServer/ip_filter.cpp b/src/xrNetServer/ip_filter.cpp index e3bf343dc4e..bbde24807ed 100644 --- a/src/xrNetServer/ip_filter.cpp +++ b/src/xrNetServer/ip_filter.cpp @@ -84,7 +84,7 @@ u32 ip_filter::load() bool ip_filter::is_ip_present(u32 ip_address) { - if (m_all_subnets.size() == 0) + if (m_all_subnets.empty()) return true; subnet_item tmp_fake_item; hton_bo(ip_address, tmp_fake_item);