Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: C027 C12832 EthernetInterface StatusReporter LM75B MQTT-ansond endpoint_core endpoint_mqtt mbed-rtos mbed
Diff: EmulatedResourceFactory.cpp
- Revision:
- 52:d1aaf4c7fd6a
- Parent:
- 47:081874a5d049
- Child:
- 74:4c8bf308383e
--- a/EmulatedResourceFactory.cpp Sun Mar 02 17:17:30 2014 +0000
+++ b/EmulatedResourceFactory.cpp Sun Mar 02 17:55:47 2014 +0000
@@ -89,11 +89,11 @@
MBEDEndpoint *endpoint = (MBEDEndpoint *)this->m_endpoint;
char *ep_name = NULL; if (endpoint != NULL) ep_name = endpoint->getEndpointName();
this->m_list[this->m_count] = new Resource(this->logger(),ep_name,name,value,NULL);
- if (io != NULL) {
+ if (io != NULL && this->m_list[this->m_count] != NULL) {
resourceInitializer initializer = (resourceInitializer)io;
(initializer)(this->m_list[this->m_count]);
}
- ++this->m_count;
+ if (this->m_list[this->m_count] != NULL) ++this->m_count;
}
// set a resource value (AND trigger the Emulated actions if registered)