mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gtimezone: Add a missing precondition assertion
Otherwise scan-build thinks there could be `NULL` pointer dereference of the `tz`. (There can’t be, it’s a false positive. 🤫) Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
2d5fc78f63
commit
79be995c0c
@ -280,6 +280,7 @@ again:
|
||||
GTimeZone *
|
||||
g_time_zone_ref (GTimeZone *tz)
|
||||
{
|
||||
g_return_val_if_fail (tz != NULL, NULL);
|
||||
g_assert (tz->ref_count > 0);
|
||||
|
||||
g_atomic_int_inc (&tz->ref_count);
|
||||
|
Loading…
Reference in New Issue
Block a user