OSDN Git Service

Prevent unhandled exception in NinePatchDrawable
authorSonia Serafimova <sonia.serafimova@sonyericsson.com>
Wed, 15 Sep 2010 11:18:44 +0000 (13:18 +0200)
committerJean-Baptiste Queru <jbq@google.com>
Sun, 26 Sep 2010 16:07:02 +0000 (09:07 -0700)
commitd45a33554ca6c18ed81e45320998b9e4f4680379
tree67a52d080094a2a46200387ba552e085bbb6e682
parentbeabe75a842d521b005999460d3a6361ab32108e
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: I9d40629a052f1390e1811288af6209d8cc3f679b
graphics/java/android/graphics/drawable/NinePatchDrawable.java