force close when music stops - Android
<p>another new problem described below:</p>

<p>When I press home button when music STILL plays, it closes correctly, but when the sound (that is five seconds long) has finished and I press home button, it gives me a force close. I have tried an else-statement; with no luck.</p>

<pre><code>protected void onStop() {
    super.onStop();
    if(mp.isPlaying()){
        mp.pause();
    }
}
</code></pre>

<p>there my variable mp is a MediaPlayer linked to this <code>mp = MediaPlayer.create(getBaseContext(), R.raw.mainsound);</code> </p>

<p>Ideas?</p>
