tabs pager application crashed with onbackpress button
<p>I'm using the sample Google provides, FragmentTabsPager to work with tabs in my application. and i add the method onbackpress to return to the first activity but this method crashed my application when i press the back button or also the home button that i didn't override it</p>

<pre><code>   @Override
    protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
      outState.putString("tab", mTabHost.getCurrentTabTag());
        }
     @Override
     public void onBackPressed()
      {
         //call intent
    Intent i = new Intent(this,home.class);
    startActivity(i);
    finish();


      }
</code></pre>

<p>it return Null pointer exception at the method onSaveInstanceState</p>

<p>so can anyone help with it thx for answer</p>
