]> git.0d.be Git - empathy.git/commitdiff
theme-adium: deal with g_resources_lookup_data() failing
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 2 Sep 2013 15:33:48 +0000 (17:33 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 2 Sep 2013 15:57:28 +0000 (17:57 +0200)
Only empathy-chat registers the gresources so when executing this code from
the empathy process (theme preview in the preferences dialog) we don't find
the resource. That's fine as this JS code is only used for the infinite
callback but best to not warning.

https://bugzilla.gnome.org/show_bug.cgi?id=707291

libempathy-gtk/empathy-theme-adium.c

index 0cf74e396b164d7255b77302f32c23c7d920ee37..ba359ceb114fd8de6ca22c02288887e1618f7df7 100644 (file)
@@ -732,6 +732,9 @@ 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);