summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-12-01 15:30:11 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-12-01 15:30:11 (GMT)
commitd99ee73dfffeb5584d91df142c7894c10d3e4509 (patch)
tree7612c0cc58eefc0754d07576a184b9966a4fe264 /Source
parent567d02c3228d153515a9bc3325ea351466000c69 (diff)
downloadCMake-d99ee73dfffeb5584d91df142c7894c10d3e4509.zip
CMake-d99ee73dfffeb5584d91df142c7894c10d3e4509.tar.gz
CMake-d99ee73dfffeb5584d91df142c7894c10d3e4509.tar.bz2
BUG: fix for 3815 seg fault
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMacroCommand.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index db4a4d6..3e1fc2d 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -235,14 +235,20 @@ bool cmMacroHelperCommand::InvokeInitialPass
}
if(!this->Makefile->ExecuteCommand(newLFF))
{
- const char* filePath = args[0].FilePath;
- if(!filePath)
+ cmListFileArgument arg;
+ if(args.size())
{
- filePath = "Unknown";
+ arg.FilePath = args[0].FilePath;
+ arg.Line = args[0].Line;
+ }
+ else
+ {
+ arg.FilePath = "Unknown";
+ arg.Line = 0;
}
cmOStringStream error;
error << "Error in cmake code at\n"
- << filePath << ":" << args[0].Line << ":\n"
+ << arg.FilePath << ":" << arg.Line << ":\n"
<< "A command failed during the invocation of macro \""
<< this->Args[0].c_str() << "\".";
cmSystemTools::Error(error.str().c_str());