summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)