mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +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:
		@@ -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);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user