Skip to content

Commit 9859880

Browse files
authored
Merge pull request #6 from Halibut-Engineering/master
Null pointer problems on objection creation.
2 parents 9706764 + a19b226 commit 9859880

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/AioP13.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,6 @@ P13Observer::P13Observer(const char *p_ccnm, double p_dlat, double p_dlon, doubl
273273
double l_dRz;
274274

275275
uint8_t len = strlen(p_ccnm)%256;
276-
if (c_ccObsName) {
277-
delete c_ccObsName;
278-
}
279276
c_ccObsName = new char[len+1];
280277
strncpy(c_ccObsName, p_ccnm, len);
281278
c_ccObsName[len] = '\0';
@@ -331,7 +328,7 @@ P13Observer::~P13Observer() {
331328
//----------------------------------------------------------------------
332329

333330
P13Satellite::P13Satellite(const char *p_ccnm, const char *p_ccl1, const char *p_ccl2) {
334-
331+
c_ccSatName = nullptr;
335332
tle(p_ccnm, p_ccl1, p_ccl2);
336333
}
337334

0 commit comments

Comments
 (0)