aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tools/flags/SkCommandLineFlags.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/flags/SkCommandLineFlags.cpp b/tools/flags/SkCommandLineFlags.cpp
index 7420d2643e..ed8db8e705 100644
--- a/tools/flags/SkCommandLineFlags.cpp
+++ b/tools/flags/SkCommandLineFlags.cpp
@@ -22,6 +22,9 @@ bool SkFlagInfo::CreateStringFlag(const char* name, const char* shortName,
void SkFlagInfo::SetDefaultStrings(SkCommandLineFlags::StringArray* pStrings,
const char* defaultValue) {
pStrings->reset();
+ if (NULL == defaultValue) {
+ return;
+ }
// If default is "", leave the array empty.
size_t defaultLength = strlen(defaultValue);
if (defaultLength > 0) {