summaryrefslogtreecommitdiff
path: root/ace/OS_NS_dirent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/OS_NS_dirent.cpp')
-rw-r--r--ace/OS_NS_dirent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ace/OS_NS_dirent.cpp b/ace/OS_NS_dirent.cpp
index 0d708ca9b74..0fa32cc497e 100644
--- a/ace/OS_NS_dirent.cpp
+++ b/ace/OS_NS_dirent.cpp
@@ -257,7 +257,7 @@ ACE_OS::scandir_emulation (const ACE_TCHAR *dirname,
if (fail)
{
ACE_OS::closedir (dirp);
- while (nfiles-- > 0)
+ while (vector && nfiles-- > 0)
{
#if defined (ACE_LACKS_STRUCT_DIR)
ACE_OS::free (vector[nfiles]->d_name);