diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-09-24 22:38:25 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-09-24 22:39:35 +0800 |
commit | b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07 (patch) | |
tree | 792804967a1838c9fdc13c315abedc868409bb28 | |
parent | fcba8619c50e66c4300099e861b0c5ab78f7d739 (diff) | |
download | gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.tar gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.tar.gz gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.tar.bz2 gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.tar.lz gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.tar.xz gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.tar.zst gsoc2013-empathy-b205d66b7ecf9c0eb6aa89ff4f67b73bc211bc07.zip |
theme-adium: still execute the start of the script if ressource is missing
This fix a regression introduced by 19e784a4b2655db5cf414c7ce43662a9adb9d0c6.
If empathy-chat.js can't be find (like in the preferences dialog) we still
want to execute the start of the script.
https://bugzilla.gnome.org/show_bug.cgi?id=708616
-rw-r--r-- | libempathy-gtk/empathy-theme-adium.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c index 652315949..a870702ac 100644 --- a/libempathy-gtk/empathy-theme-adium.c +++ b/libempathy-gtk/empathy-theme-adium.c @@ -732,12 +732,13 @@ theme_adium_add_html (EmpathyThemeAdium *self, bytes = g_resources_lookup_data ("/org/gnome/Empathy/Chat/empathy-chat.js", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); - if (bytes == NULL) - return; - js = (const gchar *) g_bytes_get_data (bytes, NULL); - g_string_prepend (string, js); - g_bytes_unref (bytes); + if (bytes != NULL) + { + js = (const gchar *) g_bytes_get_data (bytes, NULL); + g_string_prepend (string, js); + g_bytes_unref (bytes); + } script = g_string_free (string, FALSE); webkit_web_view_execute_script (WEBKIT_WEB_VIEW (self), script); |