(svn r15206) -Fix [FS#2567]: memory corruption due to not properly cleanup up the mess when cancelling a download

This commit is contained in:
rubidium
2009-01-22 10:09:56 +00:00
parent 92b9ff3f96
commit 4f5a8b15ed
5 changed files with 13 additions and 9 deletions

View File

@@ -136,7 +136,10 @@ public:
virtual void OnClick(Point pt, int widget)
{
if (widget == NCDSWW_CANCELOK) delete this;
if (widget == NCDSWW_CANCELOK && this->downloaded_bytes != this->total_bytes) {
_network_content_client.Close();
delete this;
}
}
virtual void OnDownloadProgress(const ContentInfo *ci, uint bytes)