[epiphany/gnome-3-18] web-extension: fix NULL or empty string check



commit 003380dea1ea77e057741fa46c7c1d0020be0fdd
Author: Christian Hergert <chergert redhat com>
Date:   Thu Apr 6 16:22:00 2017 -0700

    web-extension: fix NULL or empty string check
    
    We need to compare against the character, not the pointer which
    is done immediately to the left of this comparison.

 embed/web-extension/ephy-web-extension.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 8a65543..de00f6b 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -1185,7 +1185,7 @@ handle_method_call (GDBusConnection *connection,
     if (!web_page)
       return;
 
-    if (base_uri == NULL || base_uri == '\0') {
+    if (base_uri == NULL || *base_uri == '\0') {
       g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
                                              "Base URI cannot be NULL or empty");
       return;


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