]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
another NULL dereference fixed
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 1 Apr 2012 13:45:52 +0000 (13:45 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 1 Apr 2012 13:45:52 +0000 (13:45 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11781 d7cf8633-e32d-0410-b094-e92efae38249

snd_3dras.c

index 8b71d2798082b59b00829a0d0632024ff376edca..140c98fb754f8bd1329b3352b9c92a58f7f7abc1 100644 (file)
@@ -789,13 +789,13 @@ int S_StartSound_OnEnt (int entnum, int entchannel, sfx_t *sfx, float fvol, floa
                S_KillChannel(now_c);
        }else{ //We found no channel .... So we need to make a new one ...
                channel_new_smart(&prev_c,&now_c);
-               now_c->entnum    =entnum;
-               now_c->entchannel=entchannel;
                if(!now_c){
                        Con_Printf("S_StartSound_OnEnt: could not make new channel_t\n");
                        channel_delete_and_next(&prev_c,&now_c);
                        return -1;
                }
+               now_c->entnum    =entnum;
+               now_c->entchannel=entchannel;
        }
 
        //Lets start the sound on the acquired sound source and channel