aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-19 22:40:21 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-19 22:40:21 +0800
commit528fd1a0f78826908618b98644012c33c9a1674e (patch)
treef681911495ef5577cb2662c9c834ec6b16a7b12a /embed
parentf33d345bf985d35b9a997d95cbf197af959479b1 (diff)
downloadgsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.tar
gsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.tar.gz
gsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.tar.bz2
gsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.tar.lz
gsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.tar.xz
gsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.tar.zst
gsoc2013-epiphany-528fd1a0f78826908618b98644012c33c9a1674e.zip
Fix crash, thanks to Crispin for noticing this.
2004-12-19 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/MozRegisterComponents.cpp: Fix crash, thanks to Crispin for noticing this.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index aa06d9353..aac33b00e 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -78,12 +78,13 @@ RegisterContentPolicy(nsIComponentManager *aCompMgr, nsIFile *aPath,
NS_ENSURE_TRUE (cm, NS_ERROR_FAILURE);
nsresult rv;
- char *oldval;
+ char *oldval = nsnull;
rv = cm->AddCategoryEntry ("content-policy",
EPHY_CONTENT_POLICY_CONTRACTID,
EPHY_CONTENT_POLICY_CONTRACTID,
PR_TRUE, PR_TRUE, &oldval);
- nsMemory::Free (oldval);
+ if (oldval)
+ nsMemory::Free (oldval);
return rv;
}