diff --git a/library/src/main/java/com/balysv/materialmenu/MaterialMenuView.java b/library/src/main/java/com/balysv/materialmenu/MaterialMenuView.java index 60c12d5..aabdf9b 100644 --- a/library/src/main/java/com/balysv/materialmenu/MaterialMenuView.java +++ b/library/src/main/java/com/balysv/materialmenu/MaterialMenuView.java @@ -188,11 +188,13 @@ public void onRestoreInstanceState(Parcelable state) { } private void adjustDrawablePadding() { - drawable.setBounds( - 0, 0, - drawable.getIntrinsicWidth() + getPaddingLeft() + getPaddingRight(), - drawable.getIntrinsicHeight() + getPaddingTop() + getPaddingBottom() - ); + if (drawable != null) { + drawable.setBounds( + 0, 0, + drawable.getIntrinsicWidth() + getPaddingLeft() + getPaddingRight(), + drawable.getIntrinsicHeight() + getPaddingTop() + getPaddingBottom() + ); + } } private TypedArray getTypedArray(Context context, AttributeSet attributeSet, int[] attr) {