[epiphany] web-extension: fix NULL or empty string check
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] web-extension: fix NULL or empty string check
- Date: Thu, 6 Apr 2017 23:22:25 +0000 (UTC)
commit 70b28a70db0aea820f8347f2b7c521f42c304176
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 b746e04..9133081 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -1375,7 +1375,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]