aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ef0a6455..996f46b6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-12-19 Christian Persch <chpe@cvs.gnome.org>
+ * embed/mozilla/MozRegisterComponents.cpp:
+
+ Fix crash, thanks to Crispin for noticing this.
+
+2004-12-19 Christian Persch <chpe@cvs.gnome.org>
+
* src/prefs-dialog.c:
Correct code for "Afrikaans".
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;
}