1
0
Эх сурвалжийг харах

BUG: #3563. Segmentation fault with non initialized input or NULL pointers.

Glen Lehmann 19 жил өмнө
parent
commit
df3d4cb3c4

+ 5 - 0
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)