diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2015-09-22 03:00:00 +0300 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:55 +0300 |
commit | f6444c32568553e0261ca0105083658f12be6284 (patch) | |
tree | 8f4eb80f6accd2a9d0759e2564fd6a2b00836e02 /CPP/7zip/Archive/XzHandler.cpp | |
parent | cba375916fb18db8b9101aedf4fa079e019311b3 (diff) |
15.0715.07
Diffstat (limited to 'CPP/7zip/Archive/XzHandler.cpp')
-rw-r--r-- | CPP/7zip/Archive/XzHandler.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CPP/7zip/Archive/XzHandler.cpp b/CPP/7zip/Archive/XzHandler.cpp index ada14fbf..11f4b444 100644 --- a/CPP/7zip/Archive/XzHandler.cpp +++ b/CPP/7zip/Archive/XzHandler.cpp @@ -351,7 +351,8 @@ struct COpenCallbackWrap static SRes OpenCallbackProgress(void *pp, UInt64 inSize, UInt64 /* outSize */) { COpenCallbackWrap *p = (COpenCallbackWrap *)pp; - p->Res = p->OpenCallback->SetCompleted(NULL, &inSize); + if (p->OpenCallback) + p->Res = p->OpenCallback->SetCompleted(NULL, &inSize); return (SRes)p->Res; } @@ -414,7 +415,10 @@ HRESULT CHandler::Open2(IInStream *inStream, /* UInt32 flags, */ IArchiveOpenCal } RINOK(inStream->Seek(0, STREAM_SEEK_END, &_stat.PhySize)); - RINOK(callback->SetTotal(NULL, &_stat.PhySize)); + if (callback) + { + RINOK(callback->SetTotal(NULL, &_stat.PhySize)); + } CSeekInStreamWrap inStreamImp(inStream); @@ -466,7 +470,7 @@ STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCal COM_TRY_BEGIN { Close(); - return Open2(inStream, /* 0, */ callback); + return Open2(inStream, callback); } COM_TRY_END } |