]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_video_jamdecode.c
Make stepping up while jumping reliable
[xonotic/darkplaces.git] / cl_video_jamdecode.c
index 475f1f7b2d9400b2745954290060e8e503697792..04bd63489dfe7253df7ebc91b387e1474809aee8 100644 (file)
@@ -53,12 +53,12 @@ void *jam_open(clvideo_t *video, char *filename, const char **errorstring)
        // allocate stream structure
        s = (jamdecodestream_t *)Z_Malloc(sizeof(jamdecodestream_t));
        memset(s, 0, sizeof(jamdecodestream_t));
-       s->sndchan = -1;
        if (s == NULL)
        {
                *errorstring = "unable to allocate memory for stream info structure";
                return NULL;
        }
+       s->sndchan = -1;
 
        // open file
        s->file = FS_OpenVirtualFile(filename, true);
@@ -375,4 +375,4 @@ readframe:
 #endif
        }
        return 0;
-}
\ No newline at end of file
+}