Nano RGB LED mesh
Fork of nRF51822 by
Diff: source/nRF5xGattClient.cpp
- Revision:
- 561:613dbbdeed27
- Parent:
- 549:3f782c64d014
- Child:
- 563:9c4b96f7be8d
--- a/source/nRF5xGattClient.cpp Mon Jan 11 10:19:14 2016 +0000 +++ b/source/nRF5xGattClient.cpp Mon Jan 11 10:19:15 2016 +0000 @@ -18,11 +18,10 @@ nRF5xGattClient & nRF5xGattClient::getInstance(void) { - static nRF5xGattClient* nRFGattClientSingleton = NULL; - if (nRFGattClientSingleton == NULL) { - nRFGattClientSingleton = new nRF5xGattClient(); + if (gattClientInstance == NULL) { + gattClientInstance = new nRF5xGattClient(); } - return *nRFGattClientSingleton; + return (nRF5xGattClient &) *gattClientInstance; } #if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)