summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-15 14:13:40 +0200
committerGitHub <noreply@github.com>2020-04-15 14:13:40 +0200
commit42cc736bfdda0b7d0464d485eb957f5ea547bdae (patch)
tree7efab1be3fe45449f1d427227e683673cb2fbbb1
parentFixed Lua Vector unification. (#4652) (diff)
downloadcuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.tar
cuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.tar.gz
cuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.tar.bz2
cuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.tar.lz
cuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.tar.xz
cuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.tar.zst
cuberite-42cc736bfdda0b7d0464d485eb957f5ea547bdae.zip
Diffstat (limited to '')
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index 56509a1a2..371125227 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -63,7 +63,10 @@ cServerHandleImpl::~cServerHandleImpl()
void cServerHandleImpl::Close(void)
{
// Stop the listener sockets:
- evconnlistener_disable(m_ConnListener);
+ if (m_ConnListener != nullptr)
+ {
+ evconnlistener_disable(m_ConnListener);
+ }
if (m_SecondaryConnListener != nullptr)
{
evconnlistener_disable(m_SecondaryConnListener);