Remove unnecessary null pointer checks (#6358)
As reported by @elfring, we had several points in our code where it was unnecessary to check pointers were non-null before deleting them. Fixes https://github.com/meshtastic/firmware/issues/6170
This commit is contained in:
+2
-4
@@ -41,10 +41,8 @@ class AudioThread : public concurrency::OSThread
|
||||
delete i2sRtttl;
|
||||
i2sRtttl = nullptr;
|
||||
}
|
||||
if (rtttlFile != nullptr) {
|
||||
delete rtttlFile;
|
||||
rtttlFile = nullptr;
|
||||
}
|
||||
delete rtttlFile;
|
||||
rtttlFile = nullptr;
|
||||
|
||||
setCPUFast(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user