High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

Revision:
643:fa85e59ad928
Parent:
498:f3cd1e9e1ebc
Child:
499:db9bc083f91e
--- a/common/DiscoveredCharacteristic.cpp	Fri Jun 19 15:52:58 2015 +0100
+++ b/common/DiscoveredCharacteristic.cpp	Fri Jun 19 15:52:58 2015 +0100
@@ -37,6 +37,10 @@
         return BLE_ERROR_OPERATION_NOT_PERMITTED;
     }
 
+    if (!gattc) {
+        return BLE_ERROR_INVALID_STATE;
+    }
+
     return gattc->read(connHandle, valueHandle, offset);
 }