diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-11-19 08:51:46 -0800 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-11-19 08:51:46 -0800 |
commit | e26c8cd8371febe12b787aff10e123931534acf7 (patch) | |
tree | d0c97d406b652d4e097710a29471283dec25c480 /src/github | |
parent | e7077ef9be23b610ddb9035d331d418259ce449d (diff) | |
download | dsub-e26c8cd8371febe12b787aff10e123931534acf7.tar.gz dsub-e26c8cd8371febe12b787aff10e123931534acf7.tar.bz2 dsub-e26c8cd8371febe12b787aff10e123931534acf7.zip |
Fix random crash when drawer list isn't populated yet
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java index 7da8d432..14cc3f96 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -221,7 +221,7 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte drawerAdapter.setDownloadVisible(true);
}
- if(lastSelectedView == null) {
+ if(lastSelectedView == null && drawerList.getCount() > lastSelectedPosition) {
lastSelectedView = (TextView) drawerList.getChildAt(lastSelectedPosition).findViewById(R.id.drawer_name);
if(lastSelectedView != null) {
lastSelectedView.setTextAppearance(SubsonicActivity.this, R.style.DSub_TextViewStyle_Bold);
|