diff options
-rw-r--r-- | src/images/SkImageDecoder_ktx.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/images/SkImageDecoder_ktx.cpp b/src/images/SkImageDecoder_ktx.cpp index c2606321c2..058ab72646 100644 --- a/src/images/SkImageDecoder_ktx.cpp +++ b/src/images/SkImageDecoder_ktx.cpp @@ -209,6 +209,9 @@ private: }; bool SkKTXImageEncoder::onEncode(SkWStream* stream, const SkBitmap& bitmap, int) { + if (!bitmap.pixelRef()) { + return false; + } SkAutoDataUnref data(bitmap.pixelRef()->refEncodedData()); // Is this even encoded data? |