Commit 45db7bb3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

MainActivity: fix potential NullDereference

parent 877200d2
......@@ -229,7 +229,7 @@ public class MainActivity extends ActionBarActivity {
SidebarAdapter.SidebarEntry entry = (SidebarEntry) listView.getItemAtPosition(position);
Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
if(current == null || current.getTag().equals(entry.id)) { /* Already selected */
if(current == null || (entry != null && current.getTag().equals(entry.id))) { /* Already selected */
mMenu.showContent();
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment