diff options
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index cd6d18f7c..4f8e31246 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -190,7 +190,8 @@ EphyBrowser::EphyBrowser () { mFaviconEventListener = nsnull; mPopupEventListener = nsnull; - mEventReceiver = nsnull; + mEventReceiver = nsnull; + mInitialized = PR_FALSE; } EphyBrowser::~EphyBrowser () @@ -201,6 +202,8 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) { nsresult rv; + if (mInitialized) return NS_OK; + gtk_moz_embed_get_nsIWebBrowser (mozembed, getter_AddRefs(mWebBrowser)); NS_ENSURE_TRUE (mWebBrowser, NS_ERROR_FAILURE); @@ -228,6 +231,8 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) rv = GetListener(); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); + mInitialized = PR_TRUE; + return AttachListeners(); } |