Browse Source

Merge pull request #198 from Hoikas/patcher

Patcher Crash Fix
Branan Purvine-Riley 13 years ago
parent
commit
c2f33095c8
  1. 14
      Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp
  2. 3
      Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

14
Sources/Plasma/PubUtilLib/plAgeLoader/plResPatcher.cpp

@ -269,10 +269,6 @@ void plResPatcher::Finish(bool success)
{ {
while (fRequests.size()) while (fRequests.size())
fRequests.pop(); fRequests.pop();
if (fProgress) {
delete fProgress;
fProgress = nil;
}
fPatching = false; fPatching = false;
if (success) if (success)
@ -280,16 +276,14 @@ void plResPatcher::Finish(bool success)
else else
{ {
PatcherLog(kHeader, "--- Patch Killed by Error ---"); PatcherLog(kHeader, "--- Patch Killed by Error ---");
fProgress->SetAborting(); if (fProgress)
fProgress->SetAborting();
} }
delete fProgress; fProgress = nil;
plResPatcherMsg* pMsg = new plResPatcherMsg(success, sLastError); plResPatcherMsg* pMsg = new plResPatcherMsg(success, sLastError);
delete[] sLastError; sLastError = nil;
pMsg->Send(); // whoosh... off it goes pMsg->Send(); // whoosh... off it goes
if (sLastError)
{
delete[] sLastError;
sLastError = nil;
}
} }
void plResPatcher::RequestFile(const wchar_t* srvName, const wchar_t* cliName) void plResPatcher::RequestFile(const wchar_t* srvName, const wchar_t* cliName)

3
Sources/Plasma/PubUtilLib/plNetClient/plNetLinkingMgr.cpp

@ -160,10 +160,7 @@ void plNetLinkingMgr::NCAgeJoinerCallback (
// In the future, we might want to try graceful recovery (link back to Relto?) // In the future, we might want to try graceful recovery (link back to Relto?)
if (!params->success) { if (!params->success) {
plNetClientApp::GetInstance()->ErrorMsg(params->msg); plNetClientApp::GetInstance()->ErrorMsg(params->msg);
#ifdef PLASMA_EXTERNAL_RELEASE
plNetClientApp::GetInstance()->QueueDisableNet(true, params->msg); plNetClientApp::GetInstance()->QueueDisableNet(true, params->msg);
#endif
return;
} }
plNetLinkingMgr * lm = plNetLinkingMgr::GetInstance(); plNetLinkingMgr * lm = plNetLinkingMgr::GetInstance();

Loading…
Cancel
Save