[glib] Avoid a deref-before-NULL-check warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Avoid a deref-before-NULL-check warning
- Date: Tue, 14 Jun 2011 15:41:45 +0000 (UTC)
commit 3dc34de0fffca527e9a9e75f00ef913dec14da08
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 14 10:04:06 2011 -0400
Avoid a deref-before-NULL-check warning
gio/gdbusaddress.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 642aa2d..f0cb1b6 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -944,7 +944,7 @@ g_dbus_address_get_stream_sync (const gchar *address,
last_error = NULL;
addr_array = g_strsplit (address, ";", 0);
- if (addr_array[0] == NULL)
+ if (addr_array != NULL && addr_array[0] == NULL)
{
last_error = g_error_new_literal (G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]