diff options
Diffstat (limited to 'daemon/OlyUtility.cpp')
-rw-r--r-- | daemon/OlyUtility.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/OlyUtility.cpp b/daemon/OlyUtility.cpp index c72b0d1..adc7aba 100644 --- a/daemon/OlyUtility.cpp +++ b/daemon/OlyUtility.cpp @@ -24,6 +24,10 @@ OlyUtility* util = NULL; bool OlyUtility::stringToBool(const char* string, bool defValue) { char value[32]; + if (string == NULL) { + return defValue; + } + strncpy(value, string, sizeof(value)); if (value[0] == 0) { return defValue; |