sa

Fork of nRF51822 by Nordic Semiconductor

Revision:
563:9c4b96f7be8d
Parent:
561:613dbbdeed27
--- a/source/nRF5xSecurityManager.cpp	Mon Jan 11 10:19:15 2016 +0000
+++ b/source/nRF5xSecurityManager.cpp	Mon Jan 11 10:19:16 2016 +0000
@@ -17,8 +17,9 @@
 #include "nRF5xSecurityManager.h"
 
 nRF5xSecurityManager &nRF5xSecurityManager::getInstance(void) {
-    if (securityManagerInstance == NULL) {
-        securityManagerInstance = new nRF5xSecurityManager();
+    static nRF5xSecurityManager* m_instance = NULL;
+    if (m_instance == NULL) {
+        m_instance = new nRF5xSecurityManager();
     }
-    return (nRF5xSecurityManager &) *securityManagerInstance;
+    return *m_instance;
 }
\ No newline at end of file