diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2011-12-01 03:04:36 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2011-12-01 03:07:58 +0800 |
commit | 8f3c0789fe233f6c213bdee419179e18c40f84f4 (patch) | |
tree | d10179f77120409d4786f70bb208c46ecb478ba9 | |
parent | cede2ab984e13663eebf8eaa2e70c2dd85685217 (diff) | |
download | gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.tar gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.tar.gz gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.tar.bz2 gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.tar.lz gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.tar.xz gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.tar.zst gsoc2013-epiphany-8f3c0789fe233f6c213bdee419179e18c40f84f4.zip |
ephy-request-about: fix a potential crasher if the css file is missing
And prevent the corresponding GError from leaking.
-rw-r--r-- | embed/ephy-request-about.c | 5 |
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 * |