From df3d4cb3c46888df355f2b41659cb437002c610f Mon Sep 17 00:00:00 2001 From: Glen Lehmann Date: Tue, 1 Aug 2006 15:16:19 -0400 Subject: BUG: #3563. Segmentation fault with non initialized input or NULL pointers. --- Source/kwsys/Directory.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v0.12