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

Unified Diff: src/utils/win/SkDWriteFontFileStream.cpp

Issue 2046563007: fix null check bugs found by µmix static analyzer (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 6 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
« src/ports/SkFontMgr_win_dw.cpp ('K') | « src/ports/SkFontMgr_win_dw.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/win/SkDWriteFontFileStream.cpp
diff --git a/src/utils/win/SkDWriteFontFileStream.cpp b/src/utils/win/SkDWriteFontFileStream.cpp
index 460f90e6c4aff8e6928eaebef5504d5e58a4490b..6c73441e72c2100f9151e9025e883c3d8611977c 100644
--- a/src/utils/win/SkDWriteFontFileStream.cpp
+++ b/src/utils/win/SkDWriteFontFileStream.cpp
@@ -139,7 +139,7 @@ HRESULT SkDWriteFontFileStreamWrapper::Create(SkStreamAsset* stream,
SkDWriteFontFileStreamWrapper** streamFontFileStream)
{
*streamFontFileStream = new SkDWriteFontFileStreamWrapper(stream);
- if (nullptr == streamFontFileStream) {
+ if (nullptr == *streamFontFileStream) {
reed1 2016/06/08 10:35:10 We NEVER assume 'new' will return nullptr. Can we
return E_OUTOFMEMORY;
}
return S_OK;
« src/ports/SkFontMgr_win_dw.cpp ('K') | « src/ports/SkFontMgr_win_dw.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698