From 794bca7d8b9b689bc0f7daf4cc2003192147df3d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 15 May 2003 20:46:16 +0000 Subject: [PATCH] don't segfault if the profile command is run before progs have been loaded --- nq/source/sv_progs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nq/source/sv_progs.c b/nq/source/sv_progs.c index e64a64302..076daace6 100644 --- a/nq/source/sv_progs.c +++ b/nq/source/sv_progs.c @@ -124,6 +124,10 @@ ED_Count_f (void) void PR_Profile_f (void) { + if (!sv_pr_state.progs) { + Con_Printf ("no progs loaded\n"); + return; + } PR_Profile (&sv_pr_state); }