DFUService object needs to remain alive after ble.init(); declaring as static.

This commit is contained in:
Rohit Grover 2014-09-30 01:03:56 +01:00
parent e8cbc425aa
commit e1a52af1d0
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ BLEDevice::init()
/* Platforms enabled for DFU should introduce the DFU Service into
* applications automatically. */
#if defined(TARGET_OTA_ENABLED)
DFUService dfu(*this);
static DFUService dfu(*this); // defined static so that the object remains alive
#endif // TARGET_OTA_ENABLED
return BLE_ERROR_NONE;