From 9e5d7c3289870a148a8867143afdc2bccf1952f2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Jun 2006 14:49:17 +0000 Subject: [PATCH] Fixed: StartConversation didn't check for a valid target. SVN r165 (trunk) --- src/gameconfigfile.cpp | 4 ++-- src/p_lnspec.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index b5b57cd79..3aa808611 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -563,7 +563,7 @@ FString FGameConfigFile::GetConfigPath (bool tryProg) if (path.IsEmpty()) { if (Args.CheckParm ("-cdrom")) - return copystring ("c:\\zdoomdat\\zdoom.ini"); + return "c:\\zdoomdat\\zdoom.ini"; path = progdir; path += "zdoom.ini"; @@ -611,7 +611,7 @@ void FGameConfigFile::AddAutoexec (DArgs *list, const char *game) #ifndef unix if (Args.CheckParm ("-cdrom")) { - path = copystring ("c:\\zdoomdat\\autoexec.cfg"); + path = "c:\\zdoomdat\\autoexec.cfg"; } else { diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 18813c925..a9ce4ecfb 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2638,6 +2638,12 @@ FUNC(LS_StartConversation) AActor *target = iterator.Next(); + // Nothing to talk to + if (target == NULL) + { + return false; + } + // Only living players are allowed to start conversations if (it == NULL || it->player == NULL || it->player->mo != it || it->health<=0) {