aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-request-about.c
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2011-12-01 03:04:36 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2011-12-01 03:04:36 +0800
commit819cc7dea0676deb2dc6b422683780ab2a1ed8c0 (patch)
tree2ff35e9d3b6279e5304f6fcfec0e7ecdb87f073d /embed/ephy-request-about.c
parent3dca36516253cf3332627861efda6ec4f6d79a8c (diff)
downloadgsoc2013-epiphany-819cc7dea0676deb2dc6b422683780ab2a1ed8c0.tar.gz
gsoc2013-epiphany-819cc7dea0676deb2dc6b422683780ab2a1ed8c0.tar.zst
gsoc2013-epiphany-819cc7dea0676deb2dc6b422683780ab2a1ed8c0.zip
ephy-request-about: fix a potential crasher if the css file is missing
And prevent the corresponding GError from leaking.
Diffstat (limited to 'embed/ephy-request-about.c')
-rw-r--r--embed/ephy-request-about.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/embed/ephy-request-about.c b/embed/ephy-request-about.c
index 331442729..0256c8da3 100644
--- a/embed/ephy-request-about.c
+++ b/embed/ephy-request-about.c
@@ -72,9 +72,12 @@ static void
read_css_style (EphyRequestAbout *about)
{
GError *error = NULL;
+ const gchar *file = ephy_file ("about.css");
- if (!g_file_get_contents (ephy_file ("about.css"), &about->priv->css_style, NULL, &error))
+ if (file && !g_file_get_contents (file, &about->priv->css_style, NULL, &error)) {
g_debug ("%s", error->message);
+ g_error_free (error);
+ }
}
static GInputStream *