aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/WString.cpp
diff options
context:
space:
mode:
authorJeff Rowberg <jeff@rowberg.net>2019-07-29 12:16:41 -0400
committerJeff Rowberg <jeff@rowberg.net>2019-07-29 12:16:41 -0400
commitc270eaabf4b7e85b0cfbb96c57817af5995b5ad8 (patch)
treef0fdedfe7680c657ed3c6c6108cc5bd4cb24f84b /cores/arduino/WString.cpp
parente715ebfdc9b5d1ca5122eda1dac45023727532b1 (diff)
Add null pointer test to String destructor
Diffstat (limited to 'cores/arduino/WString.cpp')
-rw-r--r--cores/arduino/WString.cpp2
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);
}
/*********************************************/