Skip to content

Commit 6f1dcae

Browse files
committed
[new new] Prepare for upcoming changes of 'new' in esp8266/Arduino
See esp8266/Arduino#7536
1 parent 6622ac8 commit 6f1dcae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+115
-80
lines changed

lib/SerialDevices/jkSDS011.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ CjkSDS011::CjkSDS011(int16_t pinRX, int16_t pinTX)
3838
_command.SetPacketLength(19);
3939
_working_period = -1;
4040
_sleepmode_active = false;
41-
_serial = new ESPeasySerial(pinRX, pinTX);
42-
_serial->begin(9600);
41+
_serial = new (std::nothrow) ESPeasySerial(pinRX, pinTX);
42+
if (_serial != nullptr)
43+
_serial->begin(9600);
4344
}
4445

4546
CjkSDS011::~CjkSDS011() {

lib/SerialDevices/jkSDS011.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class CjkSDS011
6464
void ParseCommandReply();
6565

6666
// SensorSerial _serial;
67-
ESPeasySerial *_serial;
67+
ESPeasySerial *_serial = nullptr;
6868
CSensorSerialBuffer _data;
6969
CSensorSerialBuffer _command;
7070
float _pm2_5;

src/ESPeasyControllerCache.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct ControllerCache_struct {
3333

3434
void init() {
3535
if (_RTC_cache_handler == nullptr) {
36-
_RTC_cache_handler = new RTC_cache_handler_struct;
36+
_RTC_cache_handler = new (std::nothrow) RTC_cache_handler_struct;
3737
}
3838
}
3939

src/Networking.ino

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ bool SSDP_begin() {
568568

569569
if (_server) {
570570
_server->unref();
571+
571572
_server = 0;
572573
}
573574

@@ -650,7 +651,8 @@ void SSDP_send(byte method) {
650651
(uint16_t)((chipId >> 8) & 0xff),
651652
(uint16_t)chipId & 0xff);
652653

653-
char *buffer = new char[1460]();
654+
char *buffer = new (std::nothrow) char[1460]();
655+
if (buffer == nullptr) { return; }
654656
int len = snprintf(buffer, 1460,
655657
_ssdp_packet_template.c_str(),
656658
(method == 0) ? _ssdp_response_template.c_str() : _ssdp_notify_template.c_str(),

src/_C018.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct C018_data_struct {
7474
_baudrate = baudrate;
7575

7676
// FIXME TD-er: Make force SW serial a proper setting.
77-
C018_easySerial = new ESPeasySerial(serial_rx, serial_tx, false, 64, C018_FORCE_SW_SERIAL);
77+
C018_easySerial = new (std::nothrow) ESPeasySerial(serial_rx, serial_tx, false, 64, C018_FORCE_SW_SERIAL);
7878

7979
if (C018_easySerial != nullptr) {
8080
myLora = new rn2xx3(*C018_easySerial);

src/_P002_ADC.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ boolean Plugin_002(byte function, struct EventStruct *event, String& string)
191191

192192
case PLUGIN_INIT:
193193
{
194-
initPluginTaskData(event->TaskIndex, new P002_data_struct());
194+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P002_data_struct());
195195
P002_data_struct *P002_data =
196196
static_cast<P002_data_struct *>(getPluginTaskData(event->TaskIndex));
197197

src/_P014_SI7021.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ boolean Plugin_014(byte function, struct EventStruct *event, String& string)
445445
{
446446
// Get sensor resolution configuration
447447
uint8_t res = PCONFIG(0);
448-
initPluginTaskData(event->TaskIndex, new P014_data_struct(res));
448+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P014_data_struct(res));
449449
P014_data_struct *P014_data =
450450
static_cast<P014_data_struct *>(getPluginTaskData(event->TaskIndex));
451451

src/_P031_SHT1X.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ boolean Plugin_031(byte function, struct EventStruct *event, String& string)
314314

315315
case PLUGIN_INIT:
316316
{
317-
initPluginTaskData(event->TaskIndex, new P031_data_struct());
317+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P031_data_struct());
318318
P031_data_struct *P031_data =
319319
static_cast<P031_data_struct *>(getPluginTaskData(event->TaskIndex));
320320
if (nullptr == P031_data) {

src/_P035_IRTX.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ boolean Plugin_035(byte function, struct EventStruct *event, String &command)
116116
}
117117

118118
#ifdef P016_P035_Extended_AC
119-
if (Plugin_035_commonAc == 0 && irPin != -1)
119+
if (Plugin_035_commonAc == nullptr && irPin != -1)
120120
{
121121
addLog(LOG_LEVEL_INFO, F("INIT AC: IR TX"));
122122
addLog(LOG_LEVEL_INFO, String(F("Supported Protocols by IRSENDAC: ")) + listACProtocols());
123-
Plugin_035_commonAc = new IRac(irPin);
123+
Plugin_035_commonAc = new (std::nothrow) IRac(irPin);
124124
}
125-
if (Plugin_035_commonAc != 0 && irPin == -1)
125+
if (Plugin_035_commonAc != nullptr && irPin == -1)
126126
{
127127
addLog(LOG_LEVEL_INFO, F("INIT AC: IR TX Removed"));
128128
delete Plugin_035_commonAc;
@@ -298,7 +298,7 @@ boolean handleRawRaw2Encoding(const String &cmd) {
298298

299299
uint16_t idx = 0; //If this goes above the buf.size then the esp will throw a 28 EXCCAUSE
300300
uint16_t *buf;
301-
buf = new uint16_t[P35_Ntimings]; //The Raw Timings that we can buffer.
301+
buf = new (std::nothrow) uint16_t[P35_Ntimings]; //The Raw Timings that we can buffer.
302302
if (buf == nullptr)
303303
{ // error assigning memory.
304304
return false;

src/_P036_FrameOLED.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

src/_P044_P1WifiGateway.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ boolean Plugin_044(byte function, struct EventStruct *event, String& string)
9494
// It was already created and initialzed
9595
// So don't recreate to keep the webserver running.
9696
} else {
97-
initPluginTaskData(event->TaskIndex, new P044_Task());
97+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P044_Task());
9898
task = static_cast<P044_Task *>(getPluginTaskData(event->TaskIndex));
9999
}
100100
if (nullptr == task) {

src/_P049_MHZ19.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ struct P049_data_struct : public PluginTaskData_base {
140140
if (serial_rx < 0 || serial_tx < 0)
141141
return false;
142142
reset();
143-
easySerial = new ESPeasySerial(serial_rx, serial_tx);
143+
easySerial = new (std::nothrow) ESPeasySerial(serial_rx, serial_tx);
144+
if (easySerial == nullptr) {
145+
return false;
146+
}
144147
easySerial->begin(9600);
145148
ABC_Disable = setABCdisabled;
146149
if (ABC_Disable) {
@@ -443,7 +446,7 @@ boolean Plugin_049(byte function, struct EventStruct *event, String& string)
443446

444447
case PLUGIN_INIT:
445448
{
446-
initPluginTaskData(event->TaskIndex, new P049_data_struct());
449+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P049_data_struct());
447450
success = P049_performInit(event);
448451
break;
449452
}

src/_P052_SenseAir.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ boolean Plugin_052(byte function, struct EventStruct *event, String& string) {
443443
case PLUGIN_INIT: {
444444
const int16_t serial_rx = CONFIG_PIN1;
445445
const int16_t serial_tx = CONFIG_PIN2;
446-
initPluginTaskData(event->TaskIndex, new P052_data_struct());
446+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P052_data_struct());
447447
P052_data_struct *P052_data =
448448
static_cast<P052_data_struct *>(getPluginTaskData(event->TaskIndex));
449449

src/_P053_PMSx003.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ boolean Plugin_053(byte function, struct EventStruct *event, String& string)
247247
log = F("PMSx003: using software serial");
248248
addLog(LOG_LEVEL_INFO, log);
249249
}
250-
P053_easySerial = new ESPeasySerial(rxPin, txPin, false, 96); // 96 Bytes buffer, enough for up to 3 packets.
250+
P053_easySerial = new (std::nothrow) ESPeasySerial(rxPin, txPin, false, 96); // 96 Bytes buffer, enough for up to 3 packets.
251+
if (P053_easySerial == nullptr) {
252+
break;
253+
}
251254
P053_easySerial->begin(9600);
252255
P053_easySerial->flush();
253256

src/_P064_APDS9960.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,10 @@ boolean Plugin_064(byte function, struct EventStruct *event, String& string)
228228
if (PLUGIN_064_pds) {
229229
delete PLUGIN_064_pds;
230230
}
231-
PLUGIN_064_pds = new SparkFun_APDS9960();
231+
PLUGIN_064_pds = new (std::nothrow) SparkFun_APDS9960();
232+
if (PLUGIN_064_pds == nullptr) {
233+
break;
234+
}
232235

233236
String log = F("APDS : ");
234237

src/_P065_DRF0299_MP3.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ boolean Plugin_065(byte function, struct EventStruct *event, String& string)
101101
#pragma GCC diagnostic pop
102102

103103

104-
P065_easySerial = new ESPeasySerial(-1, CONFIG_PIN1); // no RX, only TX
104+
P065_easySerial = new (std::nothrow) ESPeasySerial(-1, CONFIG_PIN1); // no RX, only TX
105+
if (P065_easySerial != nullptr) {
106+
P065_easySerial->begin(9600);
107+
Plugin_065_SetVol(PCONFIG(0)); // set default volume
105108

106-
P065_easySerial->begin(9600);
107-
108-
Plugin_065_SetVol(PCONFIG(0)); // set default volume
109-
110-
success = true;
109+
success = true;
110+
}
111111
break;
112112
}
113113

src/_P068_SHT3x.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ boolean Plugin_068(byte function, struct EventStruct *event, String& string)
192192

193193
case PLUGIN_INIT:
194194
{
195-
initPluginTaskData(event->TaskIndex, new SHT3X(PCONFIG(0)));
195+
initPluginTaskData(event->TaskIndex, new (std::nothrow) SHT3X(PCONFIG(0)));
196196
success = true;
197197
break;
198198
}

src/_P069_LM75A.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ boolean Plugin_069(byte function, struct EventStruct *event, String& string)
180180
if (PLUGIN_069_LM75A) {
181181
delete PLUGIN_069_LM75A;
182182
}
183-
PLUGIN_069_LM75A = new LM75A((uint8_t)PCONFIG(0));
183+
PLUGIN_069_LM75A = new (std::nothrow) LM75A((uint8_t)PCONFIG(0));
184184

185185
success = true;
186186
break;

src/_P070_NeoPixel_Clock.ino

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ struct P070_data_struct : public PluginTaskData_base {
3434
void init(struct EventStruct *event) {
3535
if (!Plugin_070_pixels)
3636
{
37-
Plugin_070_pixels = new Adafruit_NeoPixel(NUMBER_LEDS, CONFIG_PIN1, NEO_GRB + NEO_KHZ800);
37+
Plugin_070_pixels = new (std::nothrow) Adafruit_NeoPixel(NUMBER_LEDS, CONFIG_PIN1, NEO_GRB + NEO_KHZ800);
38+
if (Plugin_070_pixels == nullptr) {
39+
return;
40+
}
3841
Plugin_070_pixels->begin(); // This initializes the NeoPixel library.
3942
}
4043
set(event);
@@ -236,7 +239,7 @@ boolean Plugin_070(byte function, struct EventStruct *event, String& string)
236239

237240
case PLUGIN_INIT:
238241
{
239-
initPluginTaskData(event->TaskIndex, new P070_data_struct());
242+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P070_data_struct());
240243
P070_data_struct* P070_data = static_cast<P070_data_struct*>(getPluginTaskData(event->TaskIndex));
241244
if (nullptr == P070_data) {
242245
return success;

src/_P073_7DGT.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ boolean Plugin_073(byte function, struct EventStruct *event, String& string) {
327327
}
328328

329329
case PLUGIN_INIT: {
330-
initPluginTaskData(event->TaskIndex, new P073_data_struct());
330+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P073_data_struct());
331331
P073_data_struct *P073_data =
332332
static_cast<P073_data_struct *>(getPluginTaskData(event->TaskIndex));
333333

src/_P074_TSL2591.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ boolean Plugin_074(byte function, struct EventStruct *event, String& string) {
150150
}
151151

152152
case PLUGIN_INIT: {
153-
initPluginTaskData(event->TaskIndex, new P074_data_struct());
153+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P074_data_struct());
154154
P074_data_struct *P074_data =
155155
static_cast<P074_data_struct *>(getPluginTaskData(event->TaskIndex));
156156

src/_P075_Nextion.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ struct P075_data_struct : public PluginTaskData_base {
5858
if (baudrate < 9600 || baudrate > 115200) {
5959
baudrate = 9600;
6060
}
61-
easySerial = new ESPeasySerial(rx, tx, false, RXBUFFSZ);
61+
easySerial = new (std::nothrow) ESPeasySerial(rx, tx, false, RXBUFFSZ);
6262
if (easySerial != nullptr) {
6363
easySerial->begin(baudrate);
6464
easySerial->flush();
@@ -239,7 +239,7 @@ boolean Plugin_075(byte function, struct EventStruct *event, String& string)
239239

240240
if(BaudCode > P075_B115200) BaudCode = P075_B9600;
241241
const uint32_t BaudArray[4] = {9600UL, 38400UL, 57600UL, 115200UL};
242-
initPluginTaskData(event->TaskIndex, new P075_data_struct(CONFIG_PIN1, CONFIG_PIN2, BaudArray[BaudCode]));
242+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P075_data_struct(CONFIG_PIN1, CONFIG_PIN2, BaudArray[BaudCode]));
243243
P075_data_struct* P075_data = static_cast<P075_data_struct*>(getPluginTaskData(event->TaskIndex));
244244
if (nullptr != P075_data) {
245245
P075_data->loadDisplayLines(event->TaskIndex);

src/_P076_HLW8012.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ boolean Plugin_076(byte function, struct EventStruct *event, String &string) {
378378
const byte SEL_PIN = CONFIG_PIN1;
379379

380380
if (CF_PIN != -1 && CF1_PIN != -1 && SEL_PIN != -1) {
381-
Plugin_076_hlw = new HLW8012;
381+
Plugin_076_hlw = new (std::nothrow) HLW8012;
382382
if (Plugin_076_hlw) {
383383
byte currentRead = PCONFIG(4);
384384
byte cf_trigger = PCONFIG(5);

src/_P077_CSE7766.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ boolean Plugin_077(byte function, struct EventStruct *event, String &string) {
242242
}
243243

244244
case PLUGIN_INIT: {
245-
initPluginTaskData(event->TaskIndex, new P077_data_struct());
245+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P077_data_struct());
246246
if (PCONFIG(0) == 0) PCONFIG(0) = HLW_UREF_PULSE;
247247
if (PCONFIG(1) == 0) PCONFIG(1) = HLW_IREF_PULSE;
248248
if (PCONFIG(2) == 0) PCONFIG(2) = HLW_PREF_PULSE;

src/_P078_Eastron.ino

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ boolean Plugin_078(byte function, struct EventStruct *event, String& string)
209209
delete Plugin_078_SoftSerial;
210210
Plugin_078_SoftSerial=NULL;
211211
}
212-
Plugin_078_SoftSerial = new ESPeasySerial(CONFIG_PIN1, CONFIG_PIN2);
212+
Plugin_078_SoftSerial = new (std::nothrow) ESPeasySerial(CONFIG_PIN1, CONFIG_PIN2);
213+
if (Plugin_078_SoftSerial == nullptr) {
214+
break;
215+
}
213216
unsigned int baudrate = p078_storageValueToBaudrate(P078_BAUDRATE);
214217
Plugin_078_SoftSerial->begin(baudrate);
215218

@@ -218,8 +221,10 @@ boolean Plugin_078(byte function, struct EventStruct *event, String& string)
218221
Plugin_078_SDM=NULL;
219222
}
220223
Plugin_078_SDM = new SDM(*Plugin_078_SoftSerial, baudrate, P078_DEPIN);
221-
Plugin_078_SDM->begin();
222-
success = true;
224+
if (Plugin_078_SDM != nullptr) {
225+
Plugin_078_SDM->begin();
226+
success = true;
227+
}
223228
break;
224229
}
225230

src/_P081_Cron.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ boolean Plugin_081(byte function, struct EventStruct *event, String& string)
266266

267267
case PLUGIN_INIT:
268268
{
269-
initPluginTaskData(event->TaskIndex, new P081_data_struct(P081_getCronExpr(event->TaskIndex)));
269+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P081_data_struct(P081_getCronExpr(event->TaskIndex)));
270270
P081_data_struct *P081_data =
271271
static_cast<P081_data_struct *>(getPluginTaskData(event->TaskIndex));
272272

src/_P082_GPS.ino

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ struct P082_data_struct : public PluginTaskData_base {
8989
return false;
9090
}
9191
reset();
92-
gps = new TinyGPSPlus();
93-
P082_easySerial = new ESPeasySerial(serial_rx, serial_tx);
94-
P082_easySerial->begin(9600);
92+
gps = new (std::nothrow) TinyGPSPlus();
93+
P082_easySerial = new (std::nothrow) ESPeasySerial(serial_rx, serial_tx);
94+
if (P082_easySerial != nullptr) {
95+
P082_easySerial->begin(9600);
96+
}
9597
return isInitialized();
9698
}
9799

@@ -393,7 +395,7 @@ boolean Plugin_082(byte function, struct EventStruct *event, String& string) {
393395
const int16_t serial_rx = CONFIG_PIN1;
394396
const int16_t serial_tx = CONFIG_PIN2;
395397
const int16_t pps_pin = CONFIG_PIN3;
396-
initPluginTaskData(event->TaskIndex, new P082_data_struct());
398+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P082_data_struct());
397399
P082_data_struct *P082_data =
398400
static_cast<P082_data_struct *>(getPluginTaskData(event->TaskIndex));
399401

src/_P085_AcuDC243.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ boolean Plugin_085(byte function, struct EventStruct *event, String& string) {
324324
case PLUGIN_INIT: {
325325
const int16_t serial_rx = CONFIG_PIN1;
326326
const int16_t serial_tx = CONFIG_PIN2;
327-
initPluginTaskData(event->TaskIndex, new P085_data_struct());
327+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P085_data_struct());
328328
P085_data_struct *P085_data =
329329
static_cast<P085_data_struct *>(getPluginTaskData(event->TaskIndex));
330330

src/_P087_SerialProxy.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ boolean Plugin_087(byte function, struct EventStruct *event, String& string) {
165165
case PLUGIN_INIT: {
166166
const int16_t serial_rx = CONFIG_PIN1;
167167
const int16_t serial_tx = CONFIG_PIN2;
168-
initPluginTaskData(event->TaskIndex, new P087_data_struct());
168+
initPluginTaskData(event->TaskIndex, new (std::nothrow) P087_data_struct());
169169
P087_data_struct *P087_data =
170170
static_cast<P087_data_struct *>(getPluginTaskData(event->TaskIndex));
171171

0 commit comments

Comments
 (0)