title: Start Activity before MainActivity in SherlockFragmentActivity
body: <p>I have 2 Activitys</p>
  
  <ul>
  <li>MainActivity</li>
  <li>LoginActivity</li>
  </ul>
  
  <p>I want verify if user has logged, else show my LoginActivity before the MainActivity apears.</p>
  
  <p>When I put this in OnCreateView of MainActivity I have an error:</p>
  
  <pre><code>    if(Login.isLogged()){
          selectItem(0);//starts the fragment
      }
      else {
          Intent i = new Intent(MainActivity.this, LoginActivity.class);
          startActivity(i);
      }
  </code></pre>
  
  <blockquote>
    <p>FATAL EXCEPTION: MAIN java.lang.RuntimeException: Unable to start activity ComponentInfo { .....MainActivity}: java.lang.NullPointerException</p>
  </blockquote>
  
  <p>Ps: My MainActivity is an SherlockFragmentActivity. I'm using DrawerLayout.</p>
  
  <p>How can i start my LoginActivity before SherlockFragmentActivity?
  Thanks</p>