fix a crash in R_SkyStartFrame when there is no worldmodel
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Jan 2007 09:27:05 +0000 (09:27 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 20 Jan 2007 09:27:05 +0000 (09:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6708 d7cf8633-e32d-0410-b094-e92efae38249

r_sky.c

diff --git a/r_sky.c b/r_sky.c
index 403e4ad..401562b 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -60,7 +60,7 @@ void R_SkyStartFrame(void)
        {
                if (skyboxside[0] || skyboxside[1] || skyboxside[2] || skyboxside[3] || skyboxside[4] || skyboxside[5])
                        skyrenderbox = true;
-               else if (r_refdef.worldmodel->brush.solidskytexture)
+               else if (r_refdef.worldmodel && r_refdef.worldmodel->brush.solidskytexture)
                        skyrendersphere = true;
                // for depth-masked sky, render the sky on the first sky surface encountered
                skyrendernow = true;