aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r--embed/mozilla/mozilla-embed.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index ae1f7f7b1..de87457e3 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -1197,7 +1197,6 @@ impl_get_encoding (EphyEmbed *embed,
{
nsresult result;
EphyWrapper *wrapper;
- nsCAutoString enc;
g_return_val_if_fail (encoding != NULL, G_FAILED);
*encoding = NULL;
@@ -1205,12 +1204,9 @@ impl_get_encoding (EphyEmbed *embed,
wrapper = MOZILLA_EMBED(embed)->priv->wrapper;
g_return_val_if_fail (wrapper != NULL, G_FAILED);
- result = wrapper->GetEncoding (enc);
- if (NS_FAILED (result)) return G_FAILED;
-
- *encoding = g_strdup (enc.get());
+ result = wrapper->GetEncoding (encoding);
- return G_OK;
+ return NS_SUCCEEDED(result) ? G_OK : G_FAILED;
}
static void