Chromium Code Reviews| Index: src/ports/SkFontMgr_win_dw.cpp |
| diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp |
| index e6e52d961ad9d62a5e318b941a5d52248a060971..bacac2ceef63154714fc1adc85bcb70b83f559f1 100644 |
| --- a/src/ports/SkFontMgr_win_dw.cpp |
| +++ b/src/ports/SkFontMgr_win_dw.cpp |
| @@ -45,7 +45,7 @@ public: |
| // Takes ownership of stream. |
| static HRESULT Create(SkStreamAsset* stream, StreamFontFileLoader** streamFontFileLoader) { |
| *streamFontFileLoader = new StreamFontFileLoader(stream); |
| - if (nullptr == streamFontFileLoader) { |
| + if (nullptr == *streamFontFileLoader) { |
| return E_OUTOFMEMORY; |
| } |
| return S_OK; |
| @@ -110,7 +110,7 @@ public: |
| static HRESULT Create(IDWriteFactory* factory, IDWriteFontFileLoader* fontFileLoader, |
| StreamFontFileEnumerator** streamFontFileEnumerator) { |
| *streamFontFileEnumerator = new StreamFontFileEnumerator(factory, fontFileLoader); |
|
reed1
2016/06/08 10:35:10
This seems like a crazy test in the first place --
|
| - if (nullptr == streamFontFileEnumerator) { |
| + if (nullptr == *streamFontFileEnumerator) { |
| return E_OUTOFMEMORY; |
| } |
| return S_OK; |
| @@ -207,7 +207,7 @@ public: |
| static HRESULT Create(IDWriteFontFileLoader* fontFileLoader, |
| StreamFontCollectionLoader** streamFontCollectionLoader) { |
| *streamFontCollectionLoader = new StreamFontCollectionLoader(fontFileLoader); |
| - if (nullptr == streamFontCollectionLoader) { |
| + if (nullptr == *streamFontCollectionLoader) { |
| return E_OUTOFMEMORY; |
| } |
| return S_OK; |