PBL mbed final

Fork of nRF51822 by Shuta Nakamae

Revision:
456:da0323feba9b
Parent:
388:db85a09c27ef
Child:
561:613dbbdeed27
--- a/source/nRF5xSecurityManager.cpp	Mon Nov 02 09:05:10 2015 +0000
+++ b/source/nRF5xSecurityManager.cpp	Mon Nov 02 09:05:10 2015 +0000
@@ -17,6 +17,9 @@
 #include "nRF5xSecurityManager.h"
 
 nRF5xSecurityManager &nRF5xSecurityManager::getInstance(void) {
-    static nRF5xSecurityManager m_instance;
-    return m_instance;
+    static nRF5xSecurityManager* m_instance = NULL;
+    if (m_instance == NULL) {
+        m_instance = new nRF5xSecurityManager();
+    }
+    return *m_instance;
 }
\ No newline at end of file