summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorGlen Lehmann <glehmann@atamai.com>2006-08-01 19:16:19 (GMT)
committerGlen Lehmann <glehmann@atamai.com>2006-08-01 19:16:19 (GMT)
commitdf3d4cb3c46888df355f2b41659cb437002c610f (patch)
treeed732735aea12c68a3b0a468dac611bed6ca2f2b /Source/kwsys
parent8a79d25927313e90f432f25c67453c45015d9176 (diff)
downloadCMake-df3d4cb3c46888df355f2b41659cb437002c610f.zip
CMake-df3d4cb3c46888df355f2b41659cb437002c610f.tar.gz
CMake-df3d4cb3c46888df355f2b41659cb437002c610f.tar.bz2
BUG: #3563. Segmentation fault with non initialized input or NULL pointers.
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/Directory.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index f7fb5e9..bc775e9 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -199,6 +199,11 @@ namespace KWSYS_NAMESPACE
bool Directory::Load(const char* name)
{
this->Clear();
+
+ if (!name)
+ {
+ return 0;
+ }
DIR* dir = opendir(name);
if (!dir)