<div dir="ltr">You coul replace the  getActivity().supportInvalidateOptionsMenu(); with activity too<br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 1, 2015 at 3:14 PM Thomas Guillem <<a href="mailto:git@videolan.org">git@videolan.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">vlc-ports/android | branch: master | Thomas Guillem <<a href="mailto:thomas@gllm.fr" target="_blank">thomas@gllm.fr</a>> | Wed Jul  1 10:41:59 2015 +0200| [0fbf6cd161f2a95b4fc795e39bfc972306c90851] | committer: Thomas Guillem<br>
<br>
MediaBrowserFragment: fix actionbar compat<br>
<br>
> <a href="http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0fbf6cd161f2a95b4fc795e39bfc972306c90851" rel="noreferrer" target="_blank">http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=0fbf6cd161f2a95b4fc795e39bfc972306c90851</a><br>
---<br>
<br>
 .../src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java    |    5 +++--<br>
 1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java<br>
index 73657b7..484727a 100644<br>
--- a/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java<br>
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.java<br>
@@ -45,8 +45,9 @@ public abstract class MediaBrowserFragment extends PlaybackServiceFragment {<br>
     public abstract void clear();<br>
     public void onStart(){<br>
         super.onStart();<br>
-        if (getActivity().getActionBar() != null) {<br>
-            ((AppCompatActivity) getActivity()).getSupportActionBar().setTitle(getTitle());<br>
+        final AppCompatActivity activity = (AppCompatActivity)getActivity();<br>
+        if (activity != null && activity.getSupportActionBar() != null) {<br>
+            activity.getSupportActionBar().setTitle(getTitle());<br>
             getActivity().supportInvalidateOptionsMenu();<br>
         }<br>
     }<br>
<br>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org" target="_blank">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</blockquote></div>