[glib] GDateTime: Add guards to g_date_time_new()
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GDateTime: Add guards to g_date_time_new()
- Date: Sat, 28 Jun 2014 17:52:36 +0000 (UTC)
commit 88b284c07051ccf5a7561d04236d83c8bb61993a
Author: Bastien Nocera <hadess hadess net>
Date: Thu Apr 17 09:18:14 2014 +0200
GDateTime: Add guards to g_date_time_new()
https://bugzilla.gnome.org/show_bug.cgi?id=728401
glib/gdatetime.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gdatetime.c b/glib/gdatetime.c
index 2d20679..cbbf620 100644
--- a/glib/gdatetime.c
+++ b/glib/gdatetime.c
@@ -944,6 +944,8 @@ g_date_time_new (GTimeZone *tz,
GDateTime *datetime;
gint64 full_time;
+ g_return_val_if_fail (tz != NULL, NULL);
+
if (year < 1 || year > 9999 ||
month < 1 || month > 12 ||
day < 1 || day > 31 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]