[epiphany] ephy-web-view.c: use NULL-safe str compare function



commit ac2328b73528ca5d3408222920fd8143a6e76eec
Author: Xan Lopez <xan gnome org>
Date:   Thu Dec 17 18:07:31 2009 +0100

    ephy-web-view.c: use NULL-safe str compare function
    
    Fixes crasher in pages with no rel elements.

 embed/ephy-web-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index d693cf6..e5b0b48 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1230,7 +1230,7 @@ do_hook_into_links (JSContextRef js_context, EphyWebView *web_view)
     JSObjectRef obj = JSValueToObject (js_context, link, NULL);
     char *rel = js_get_element_attribute (js_context, obj, "rel");
 
-    if (g_str_equal (rel, "alternate")) {
+    if (g_strcmp0 (rel, "alternate") == 0) {
       char *type = js_get_element_attribute (js_context, obj, "type");
       char *title = js_get_element_attribute (js_context, obj, "title");
       char *address = js_get_element_attribute (js_context, obj, "href");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]