gdatetime: add NULL guard in g_date_time_new_now()

Add a missing g_return_() check in g_date_time_new_now().
A clear warning is better than a NULL pointer dereference.
This commit is contained in:
Peter Bloomfield 2022-10-09 19:39:58 -04:00
parent 2b8b866bae
commit 574a2ecfa9

View File

@ -959,6 +959,8 @@ g_date_time_new_now (GTimeZone *tz)
{
gint64 now_us;
g_return_val_if_fail (tz != NULL, NULL);
now_us = g_get_real_time ();
return g_date_time_new_from_unix (tz, now_us);