title: android.support.v4.app.Fragment.mFragmentManager' on a null object reference
body: <p>i have the follow lines of code that I am using to create a navigationview to load fragments and this android application. I am getting the error: <strong>android.support.v4.app.Fragment.mFragmentManager' on a null object reference</strong>. I created the fragments already and the navigationview works.</p>
  
  <pre><code>public void selectDrawerItem(MenuItem menuItem){
  
      Fragment fragment = null;
      Class fragmentClass = null;
  
      switch(menuItem.getItemId()){
          case R.id.nav_show_all_events_activity:
              fragmentClass = AllEventsFragment.class;
              break;
          case R.id.nav_whats_hot_today_activity:
              fragmentClass = WhatsHotFragment.class;
              break;
      }
  
      try {
          fragment = (Fragment) fragmentClass.newInstance();
      } catch (Exception e) {
          e.printStackTrace();
      }
  
      FragmentManager fragmentManager = getSupportFragmentManager();
      fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();
  
      menuItem.setChecked(true);
      setTitle(menuItem.getTitle());
      mDrawer.closeDrawers();
  }
  </code></pre>