Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: src/core/SkString.cpp

Issue 1317913005: whitelist fallback typefaces (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compiler bugs Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPictureData.cpp ('k') | src/core/SkTypeface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkString.cpp
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index d93f662da3d8bc0a80ca96903752bbcc3977ba1e..d75b2edaaea40eeb99897001252f8d3e772e8a9f 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -377,7 +377,7 @@ void SkString::set(const char text[], size_t len) {
p[len] = 0;
fRec->fLength = SkToU32(len);
} else {
- SkString tmp(text, len);
+ SkString tmp(text ? text : this->c_str(), len);
bungeman-skia 2015/08/28 21:09:57 What is this for? If text is NULL here, shouldn't
reed1 2015/08/31 12:20:25 +1 -- seems like its an error (assert?) to pass NU
this->swap(tmp);
}
}
« no previous file with comments | « src/core/SkPictureData.cpp ('k') | src/core/SkTypeface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698