title: onPrepared causing one user an error
body: <p>I've had this simple program out for about two months and the other night an error showed up for a user and I don't understand why. </p>
  
  <pre><code>public class mainmenu extends Activity implements OnPreparedListener {
      private PopupWindow pw;
      public static int RandomNum;
      public static String quickStart;
      private dbadapter mydbhelper;
      MediaPlayer mpButtonClick;
      Intent intent;
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.mainmenu);
  
  
  
  
      Button bsound = (Button) findViewById(R.id.bCategories);
      bsound.setOnClickListener(new View.OnClickListener() {
  
  
          public void onClick(View v) {
              quickStart = "Cate";
              onPrepared(mpButtonClick);
              intent = new Intent ("wanted.pro.madlibslite.CATEGORIES");
              intent.putExtra("quickStart", quickStart);
              startActivity(intent);
          }
      });
  
  
  
      }
  
      @Override
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if (keyCode == KeyEvent.KEYCODE_BACK) {
              moveTaskToBack(true);
              return true;
          }
          return super.onKeyDown(keyCode, event);
      }
  
      //Menu Items
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          MenuInflater inflater = getMenuInflater();
          inflater.inflate(R.layout.mainmenu, menu);
          return true;
      }
  
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle item selection
          switch (item.getItemId()) {
               case R.id.help:
                 showHelp();
                  return true;
             }
          return false;
      }
  
          private void showHelp() {
              LayoutInflater inflater = (LayoutInflater)
                         this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                       pw = new PopupWindow(
                         inflater.inflate(R.layout.help, null, false), 
                         LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT, 
                         true);
                       pw.showAtLocation(this.findViewById(R.id.bCategories), Gravity.CENTER, 0, 0); 
          }
          public void onClickHelp(View helper){pw.dismiss();
  
          }   
          //QuickStart
          public void onClickQuick(View main) {
              Toast.makeText(this, "Quick Start only available in full version.", 1000).show();
              //RandomNum = (int) (Math.random()*101);
              //quickStart = "Quick";
              //mpButtonClick.start();
              //startActivity(new Intent("wanted.pro.madlibslite.INPUTPAGE"));
  
  
          }
  
          public void onPrepared(MediaPlayer player) {
              mpButtonClick.setOnPreparedListener(this);
              try {
                  mpButtonClick.prepare();
  
              } catch (IllegalStateException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
              mpButtonClick.start();
          }
  
          @Override
          protected void onResume() {
              mydbhelper = dbadapter.getInstance(mainmenu.this);
              mydbhelper.open();
              mpButtonClick = MediaPlayer.create(this, R.raw.button50);
              super.onResume();
          }
  
          @Override
          protected void onPause() {
              mpButtonClick.release();
              super.onPause();
          }
  
  } 
  </code></pre>
  
  <p>The error in question...</p>
  
  <pre><code>java.lang.NullPointerException
  at wanted.pro.madlibslite.mainmenu.onPrepared(mainmenu.java:107)
  at wanted.pro.madlibslite.mainmenu$1.onClick(mainmenu.java:45)
  at android.view.View.performClick(View.java:2485)
  at android.view.View$PerformClick.run(View.java:9089)
  at android.os.Handler.handleCallback(Handler.java:587)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:130)
  at android.app.ActivityThread.main(ActivityThread.java:3806)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Sadly I don't have what device they are on. But hoping someone here might see something I'm doing wrong that would cause the onprepared to error.</p>