Prevent unhandled exception in NinePatchDrawable
authorSonia Serafimova <sonia.serafimova@sonyericsson.com>
Wed, 15 Sep 2010 11:18:44 +0000 (13:18 +0200)
committerJohan Redestig <johan.redestig@sonyericsson.com>
Wed, 15 Sep 2010 11:22:43 +0000 (13:22 +0200)
commit279d006b1d194c597a4c6b0a72f66ea6128851fa
treea89ac61097ee600c0449148246c6803aa0ebf569
parent15f0a79a81fd18211603587bcd46eee0e37ced4d
Prevent unhandled exception in NinePatchDrawable

Added null check in computeBitmapSize() to avoid unhandled
exception "java.lang.NullPointerException" at
android.graphics.Rect.<init>(Rect.java:72).

This problem was discovered in the wild.

Change-Id: I8a4729ceadcfc9744f11b8ceafdf24d6de88c645
graphics/java/android/graphics/drawable/NinePatchDrawable.java