Fix music mixing crash that can occur under the right conditions.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 14 Jul 2011 12:33:48 -0700
changeset 5103a4c352a9a00
parent 509 777497efacaa
child 511 55a686ef0680
Fix music mixing crash that can occur under the right conditions.
music.c
     1.1 --- a/music.c	Wed Jun 15 03:41:31 2011 -0400
     1.2 +++ b/music.c	Thu Jul 14 12:33:48 2011 -0700
     1.3 @@ -1218,6 +1218,11 @@
     1.4  static int music_internal_playing()
     1.5  {
     1.6  	int playing = 1;
     1.7 +
     1.8 +	if (music_playing == NULL) {
     1.9 +		return 0;
    1.10 +	}
    1.11 +
    1.12  	switch (music_playing->type) {
    1.13  #ifdef CMD_MUSIC
    1.14  	    case MUS_CMD: