Skip to content

Commit daf2e8b

Browse files
committed
Fix rotation of transaction lists causes crash of application
Fixes #664
1 parent 07dc956 commit daf2e8b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/src/main/java/org/gnucash/android/ui/transaction/TransactionsActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,10 @@ public void onItemSelected(AdapterView<?> parent, View view, int position, long
143143
mTabLayout.addTab(mTabLayout.newTab().setText(R.string.section_header_transactions));
144144
}
145145
}
146-
// Hide the favorite icon of the selected account to avoid clutter
147-
((TextView) view).setCompoundDrawablesWithIntrinsicBounds(0,0,0,0);
146+
if (view != null) {
147+
// Hide the favorite icon of the selected account to avoid clutter
148+
((TextView) view).setCompoundDrawablesWithIntrinsicBounds(0, 0, 0, 0);
149+
}
148150
//refresh any fragments in the tab with the new account UID
149151
refresh();
150152
}

0 commit comments

Comments
 (0)