l3cfg: fix assertion in NM_IS_L3_CONFIG_DATA() to allow NULL

This commit is contained in:
Thomas Haller 2021-09-16 18:02:50 +02:00
parent 882168c728
commit 0d4840c484
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -185,7 +185,7 @@ NM_IS_L3_CONFIG_DATA(const NML3ConfigData *self)
*
* Additionally, also call nm_l3_config_data_get_ifindex(), which does more
* checks during nm_assert(). */
nm_assert(nm_l3_config_data_get_ifindex(self) > 0);
nm_assert(!self || nm_l3_config_data_get_ifindex(self) > 0);
return !!self;
}