summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlinus_lee <llee@cyngn.com>2014-10-31 16:54:38 -0700
committerlinus_lee <llee@cyngn.com>2014-11-20 12:51:36 -0800
commit23ec47c84be2de2f09c5e51c99d1e36b77ea1318 (patch)
treeb37a22110de2a6247d2390b09049fa8c03489130 /src
parent21bdabf4f224f6176c7763b97eef1c98a0e1bf68 (diff)
downloadandroid_packages_apps_Eleven-23ec47c84be2de2f09c5e51c99d1e36b77ea1318.tar.gz
android_packages_apps_Eleven-23ec47c84be2de2f09c5e51c99d1e36b77ea1318.tar.bz2
android_packages_apps_Eleven-23ec47c84be2de2f09c5e51c99d1e36b77ea1318.zip
Eleven - Fix the PlaylistDetailFragment crash
https://cyanogen.atlassian.net/browse/MUSIC-154 Change-Id: Ifd27b231b0d98df0133f961c0b4bcd5a7c0dfbbc
Diffstat (limited to 'src')
-rw-r--r--src/com/cyngn/eleven/ui/fragments/PlaylistDetailFragment.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/com/cyngn/eleven/ui/fragments/PlaylistDetailFragment.java b/src/com/cyngn/eleven/ui/fragments/PlaylistDetailFragment.java
index 06afd54..8e13067 100644
--- a/src/com/cyngn/eleven/ui/fragments/PlaylistDetailFragment.java
+++ b/src/com/cyngn/eleven/ui/fragments/PlaylistDetailFragment.java
@@ -366,8 +366,15 @@ public class PlaylistDetailFragment extends FadingBarFragment implements
getContainingActivity().postRemoveFragment(this);
return;
}
- // update action bar title and popup menu handler
- ((PlaylistPopupMenuHelper)mActionMenuHelper).updateName(mPlaylistName);
+
+ // since onCreateOptionsMenu can be called after onCreate it is possible for
+ // mActionMenuHelper to be null. In this case, don't bother updating the Name since when
+ // it does create it, it will use the updated name anyways
+ if (mActionMenuHelper != null) {
+ // update action bar title and popup menu handler
+ ((PlaylistPopupMenuHelper) mActionMenuHelper).updateName(mPlaylistName);
+ }
+
getContainingActivity().setActionBarTitle(mPlaylistName);
// and reload the song list
getLoaderManager().restartLoader(0, getArguments(), this);