commit | 562bf17c6c7c5226b2220e27a1543d4a43543d6c | [log] [tgz] |
---|---|---|
author | Phil Dubach <phillipd@google.com> | Tue Jun 23 15:41:00 2009 -0700 |
committer | Phil Dubach <phillipd@google.com> | Tue Jun 23 15:46:31 2009 -0700 |
tree | ab5680ea262c8cfe81a1e3cc298398e81c657e2e | |
parent | 61ab270c17094ef1373f54d8fb9ade6d287c3a60 [diff] |
Fix NPE in GradientDrawable constructor The mColors member can be null, as can be seen in GradientDrawable.setSolidColor() or the plain constructor. In that case, an NPE will be thrown on attempts to derive a new GradientDrawable from the instance using the private constructor GradientDrawable(GradientDrawable). The problem also occurs when inflating a GradientDrawable from XML without defining the start, center and end colors and then calling mutate() on the instance.