OSDN Git Service

Initialize pointer members to NULL to avoid illegal reference
authorlina.x.pi <lina.x.pi@sonymobile.com>
Thu, 9 Jan 2014 10:17:03 +0000 (18:17 +0800)
committerTakeshi Aimi <takeshi.aimi@sonymobile.com>
Fri, 17 Jan 2014 04:49:26 +0000 (13:49 +0900)
mBitmap and mTexture is not initialized to NULL which causes
illegal address access when it fails to be created from
oversized bitmap.

Change-Id: Iea54bec8788bc5f3a10040fdb43f416c0d41a14c

libs/hwui/SkiaShader.h

index a63431c..cc56c50 100644 (file)
@@ -145,7 +145,7 @@ struct SkiaBitmapShader: public SkiaShader {
             GLuint* textureUnit);
 
 private:
-    SkiaBitmapShader() {
+    SkiaBitmapShader() : mBitmap(NULL), mTexture(NULL) {
     }
 
     SkBitmap* mBitmap;