title: NullPointerException while switching to an activity
body: <p>I've got one problem: I get a <code>NullPointerException</code> if I try to switch into a class with this code: </p>
  
  <pre><code>aw1.setOnClickListener(new View.OnClickListener() {
                  public void onClick(View view) {
  
  
                  if(Saver.getStage()==Saver.getGroup()/*&amp;&amp;Saver.getPoints()!=0*/)
                  {   Saver.setPoints(Saver.getPoints()+20);
                      Intent myIntent = new Intent(view.getContext(), Finish.class);
                      startActivityForResult(myIntent, 0);}
                  if(Stages.check(Saver.getStage())==1)
                  {Saver.setPoints(Saver.getPoints()+20);}
  
                  if(Saver.getStage()&lt;8)          
                  {Saver.setStage(Saver.getStage()+1);}
                  else    
                  {Saver.setStage(0);}
  
  
  
                  Intent intent = new Intent();
                  setResult(RESULT_OK, intent);
                  finish();
  
  
              }
  
          });
  </code></pre>
  
  <p>I want to switch to Finish.class</p>
  
  <p>The code of Finish.java:</p>
  
  <pre><code>package com.example.romrallye;
  
  import com.example.romrallye.MainActivity;
  import com.example.romrallye.R;
  
  import android.support.v7.app.ActionBarActivity;
  import android.support.v7.app.ActionBar;
  import android.support.v4.app.Fragment;
  import android.os.Bundle;
  import android.view.LayoutInflater;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.ViewGroup;
  import android.os.Build;
  import android.widget.Button;
  import android.widget.TextView;
  import android.app.Activity;
  import android.content.Intent;
  
  public class Finish extends MainActivity {
  
  private TextView punkte;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.finish_main);
      punkte = (TextView) findViewById(R.id.txtpunkte);
      punkte.setText(Saver.getPoints());
  
  
  
       Button next = (Button) findViewById(R.id.bt_back4);
          next.setOnClickListener(new View.OnClickListener() {
              public void onClick(View view) {
                  Intent intent = new Intent();
                  setResult(RESULT_OK, intent);
                  finish();
              }
  
          });}
  
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
  
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
      if (id == R.id.action_settings) {
          return true;
      }
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And here the error from the LogCat:</p>
  
  <p><img src="https://i.stack.imgur.com/pEnUU.png" alt="enter image description here"></p>