From f6f8d74635f1921321b2e04cfe672505c5596a97 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 1 Apr 2012 01:40:57 +0000 Subject: [PATCH] - Fixed: Trying to -playdemo a demo recorded from -loadgame would crash if you did not -loadgame the corresponding save. SVN r3498 (trunk) --- src/g_game.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/g_game.cpp b/src/g_game.cpp index 286744ac3..cee9259b3 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -2589,6 +2589,10 @@ void G_DoPlayDemo (void) { G_InitNew (mapname, false); } + else if (numsectors == 0) + { + I_Error("Cannot play demo without its savegame\n"); + } C_HideConsole (); demonew = false; precache = true; @@ -2652,8 +2656,10 @@ bool G_CheckDemoStatus (void) playeringame[i] = 0; consoleplayer = 0; players[0].camera = NULL; - StatusBar->AttachToPlayer (&players[0]); - + if (StatusBar != NULL) + { + StatusBar->AttachToPlayer (&players[0]); + } if (singledemo || timingdemo) { if (timingdemo)