aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2004-01-23 07:19:02 +0800
committerXan Lopez <xan@src.gnome.org>2004-01-23 07:19:02 +0800
commita3d35aec7cd2e6146d20efadf4c88b1a156d0e1b (patch)
treeba8a13f1eee6aa32f6d670ae3982dd200733c8a8 /embed
parent200d54ac01a9d4af824f9856c8a90daa786c1c2b (diff)
downloadgsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.tar
gsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.tar.gz
gsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.tar.bz2
gsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.tar.lz
gsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.tar.xz
gsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.tar.zst
gsoc2013-epiphany-a3d35aec7cd2e6146d20efadf4c88b1a156d0e1b.zip
Make Cancel safe against non active downloads.
* embed/mozilla/MozDownload.cpp: Make Cancel safe against non active downloads.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/MozDownload.cpp6
1 files changed, 6 insertions, 0 deletions
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 ();