diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-10-24 17:27:49 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-10-24 17:27:49 -0700 |
commit | a90dcea84543ebb23b443981b28bb9a370bb8038 (patch) | |
tree | d22f171ac81c0764b75cdc78adfe6c8f8d5b8a8f | |
parent | e7f8cea262a0419b2b1653c1ffa536d34c2083ea (diff) | |
download | dsub-a90dcea84543ebb23b443981b28bb9a370bb8038.tar.gz dsub-a90dcea84543ebb23b443981b28bb9a370bb8038.tar.bz2 dsub-a90dcea84543ebb23b443981b28bb9a370bb8038.zip |
Fix orientation change crash
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicActivity.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicActivity.java b/src/github/daneren2005/dsub/activity/SubsonicActivity.java index 313d6957..07c35336 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicActivity.java @@ -231,8 +231,10 @@ public class SubsonicActivity extends ActionBarActivity implements OnItemSelecte @Override
public boolean onCreateOptionsMenu(Menu menu) {
- MenuInflater menuInflater = getMenuInflater();
- currentFragment.onCreateOptionsMenu(menu, menuInflater);
+ if(currentFragment != null) {
+ MenuInflater menuInflater = getMenuInflater();
+ currentFragment.onCreateOptionsMenu(menu, menuInflater);
+ }
return true;
}
@Override
|