aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 19:37:52 +0000
committerGravatar scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-04-24 19:37:52 +0000
commitd0419019de2a15a87d390fb0eed929acf9029d75 (patch)
tree2f8b9bd767f60d9eba603944e647584bdf5cb494
parent5d71adf4b187b41858139675a499a704af15b2cb (diff)
Fix the build.
Allow NULL for defaultValue in SkCommandLineFlags. unreviewed. Review URL: https://codereview.chromium.org/14472017 git-svn-id: http://skia.googlecode.com/svn/trunk@8847 2bbb7eff-a529-9590-31e7-b0007b416f81
-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) {