Fix NPE for invalid target exception

Change-Id: I57b319fae617792351c6ec9872c3b73cd25dc4e5
This commit is contained in:
Doris Liu
2016-02-03 11:10:49 -08:00
parent 0eef10e556
commit d4fda02dd5

View File

@@ -852,8 +852,8 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable2 {
(VectorDrawable.VectorDrawableState) target, startTime);
} else {
// Should never get here
throw new UnsupportedOperationException("Target should be either VGroup, VPath, " +
"or ConstantState, " + target.getClass() + " is not supported");
throw new UnsupportedOperationException("Target should be group, path or vector. " +
target == null ? "Null target" : target.getClass() + " is not supported");
}
}