mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +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 *
|
GTimeZone *
|
||||||
g_time_zone_ref (GTimeZone *tz)
|
g_time_zone_ref (GTimeZone *tz)
|
||||||
{
|
{
|
||||||
|
g_return_val_if_fail (tz != NULL, NULL);
|
||||||
g_assert (tz->ref_count > 0);
|
g_assert (tz->ref_count > 0);
|
||||||
|
|
||||||
g_atomic_int_inc (&tz->ref_count);
|
g_atomic_int_inc (&tz->ref_count);
|
||||||
|
Loading…
Reference in New Issue
Block a user