summaryrefslogtreecommitdiff
path: root/storage/connect/tabmul.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/tabmul.cpp')
-rwxr-xr-xstorage/connect/tabmul.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp
index 146e2891ec7..14ebd8d891a 100755
--- a/storage/connect/tabmul.cpp
+++ b/storage/connect/tabmul.cpp
@@ -884,9 +884,11 @@ void TDBDIR::CloseDB(PGLOBAL g)
_findclose(Hsearch);
Hsearch = -1;
#else // !WIN32
- // Close the DIR handle.
- closedir(Dir);
- Dir = NULL;
+ // Close the DIR handle
+ if (dir) {
+ closedir(Dir);
+ Dir = NULL;
+ } // endif dir
#endif // !WIN32
iFile = 0;
} // end of CloseDB