High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
502:557c4a9276ae
Parent:
501:ff6801633d2c
Child:
504:817c6240e9d9
--- a/common/DiscoveredCharacteristic.cpp	Fri Jun 19 15:52:03 2015 +0100
+++ b/common/DiscoveredCharacteristic.cpp	Fri Jun 19 15:52:03 2015 +0100
@@ -40,5 +40,9 @@
         return BLE_ERROR_OPERATION_NOT_PERMITTED;
     }
 
+    if (!gattc) {
+        return BLE_ERROR_INVALID_STATE;
+    }
+
     return gattc->write(GattClient::OP_WRITE_CMD, connHandle, length, value);
 }
\ No newline at end of file