aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/MozDownload.cpp6
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 086b5cc5e..125284c18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-23 Xan Lopez <xan@gnome.org>
+
+ * embed/mozilla/MozDownload.cpp:
+
+ Make Cancel safe against non active downloads.
+
2004-01-23 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed.h:
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index 38b06d064..6808c0251 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -406,6 +406,12 @@ MozDownload::OnSecurityChange (nsIWebProgress *aWebProgress, nsIRequest *aReques
void
MozDownload::Cancel()
{
+ if (mDownloadState != EPHY_DOWNLOAD_DOWNLOADING &&
+ mDownloadState != EPHY_DOWNLOAD_PAUSED)
+ {
+ return;
+ }
+
if (mWebPersist)
{
mWebPersist->CancelSave ();