Skip to content

Commit

Permalink
Closes aritraroy#1 Don't allow originalText field to be null
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaJamesOng committed Oct 5, 2018
1 parent 22943b8 commit 99c6200
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ private void init(AttributeSet attrs, int defStyle) {
try {
kerningFactor = currentTypedArray.getFloat(R.styleable.KerningViews_kv_spacing,
NO_KERNING);
originalText = originalTypedArray.getText(0);
CharSequence attributeText = originalTypedArray.getText(0);
originalText = attributeText != null ? attributeText : "";
} finally {
originalTypedArray.recycle();
currentTypedArray.recycle();
Expand Down

0 comments on commit 99c6200

Please sign in to comment.