diff options
author | Jeff Rowberg <jeff@rowberg.net> | 2019-07-29 12:16:41 -0400 |
---|---|---|
committer | Jeff Rowberg <jeff@rowberg.net> | 2019-07-29 12:16:41 -0400 |
commit | c270eaabf4b7e85b0cfbb96c57817af5995b5ad8 (patch) | |
tree | f0fdedfe7680c657ed3c6c6108cc5bd4cb24f84b /cores | |
parent | e715ebfdc9b5d1ca5122eda1dac45023727532b1 (diff) |
Add null pointer test to String destructor
Diffstat (limited to 'cores')
-rw-r--r-- | cores/arduino/WString.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp index f2572d6..043fda7 100644 --- a/cores/arduino/WString.cpp +++ b/cores/arduino/WString.cpp @@ -121,7 +121,7 @@ String::String(double value, unsigned char decimalPlaces) String::~String() { - free(buffer); + if (buffer) free(buffer); } /*********************************************/ |