summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/kwsys/SystemTools.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 814c417..2dd3213 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3980,6 +3980,10 @@ kwsys_stl::string SystemTools::GetParentDirectory(const char* fileOrDir)
bool SystemTools::IsSubDirectory(const char* cSubdir, const char* cDir)
{
+ if(!*cDir)
+ {
+ return false;
+ }
kwsys_stl::string subdir = cSubdir;
kwsys_stl::string dir = cDir;
SystemTools::ConvertToUnixSlashes(dir);