summaryrefslogtreecommitdiffstats
path: root/src/common/singleton.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2014-10-07 22:15:40 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2014-10-07 22:15:40 +0200
commit5274acd624c3a5ad60592cee2ebc869b10a96fda (patch)
tree04836157b8c3aa9553d5e67e8ed248220ff1661a /src/common/singleton.h
parent3ef2f976df56817d2a23d4fe88a1917798beaacd (diff)
parent2770ee8927cb91419b1918f46228435026790cf6 (diff)
downloadcolobot-5274acd624c3a5ad60592cee2ebc869b10a96fda.tar.gz
colobot-5274acd624c3a5ad60592cee2ebc869b10a96fda.tar.bz2
colobot-5274acd624c3a5ad60592cee2ebc869b10a96fda.zip
Merge with dev
Diffstat (limited to 'src/common/singleton.h')
-rw-r--r--src/common/singleton.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/common/singleton.h b/src/common/singleton.h
index 841759d..bf5bc9d 100644
--- a/src/common/singleton.h
+++ b/src/common/singleton.h
@@ -62,10 +62,7 @@ public:
static void ReplaceInstance(T* newInstance)
{
assert(newInstance != nullptr);
-
- if (m_instance != nullptr)
- delete m_instance;
-
+ delete m_instance;
m_instance = newInstance;
}
#endif