aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Archive
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Archive')
-rw-r--r--lib/Archive/ArchiveWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp
index 07f7d88..04cc981 100644
--- a/lib/Archive/ArchiveWriter.cpp
+++ b/lib/Archive/ArchiveWriter.cpp
@@ -348,7 +348,7 @@ Archive::writeToDisk(bool CreateSymbolTable, bool TruncateNames, bool Compress,
{
// Make sure they haven't opened up the file, not loaded it,
// but are now trying to write it which would wipe out the file.
- if (members.empty() && mapfile->size() > 8) {
+ if (members.empty() && mapfile && mapfile->size() > 8) {
if (ErrMsg)
*ErrMsg = "Can't write an archive not opened for writing";
return true;