@@ -243,7 +243,7 @@ boolean Plugin_036(uint8_t function, struct EventStruct *event, String& string)
243243 // For load and save of the display lines, we must not rely on the data in memory.
244244 // This data in memory can be altered through write commands.
245245 // Therefore we must read the lines from flash in a temporary object.
246- P036_data_struct *P036_data = new P036_data_struct ();
246+ P036_data_struct *P036_data = new (std::nothrow) P036_data_struct ();
247247
248248 if (nullptr != P036_data) {
249249 uint8_t version = get4BitFromUL (PCONFIG_LONG (0 ), 20 ); // Bit23-20 Version CustomTaskSettings
@@ -302,7 +302,7 @@ boolean Plugin_036(uint8_t function, struct EventStruct *event, String& string)
302302 // For load and save of the display lines, we must not rely on the data in memory.
303303 // This data in memory can be altered through write commands.
304304 // Therefore we must use a temporary version to store the settings.
305- P036_data_struct *P036_data = new P036_data_struct ();
305+ P036_data_struct *P036_data = new (std::nothrow) P036_data_struct ();
306306
307307 if (nullptr != P036_data) {
308308 String error;
@@ -349,7 +349,7 @@ boolean Plugin_036(uint8_t function, struct EventStruct *event, String& string)
349349
350350 case PLUGIN_INIT:
351351 {
352- initPluginTaskData (event->TaskIndex , new P036_data_struct ());
352+ initPluginTaskData (event->TaskIndex , new (std::nothrow) P036_data_struct ());
353353 P036_data_struct *P036_data =
354354 static_cast <P036_data_struct *>(getPluginTaskData (event->TaskIndex ));
355355
0 commit comments