shared: fix handling %NULL argument in nm_ref_string_equals_str()

Fixes: 190a8ed425 ('shared: add nm_ref_string_equals_str() helper')
This commit is contained in:
Thomas Haller
2020-03-02 15:48:43 +01:00
parent 30e90b0d95
commit 8b63fd8cc0

View File

@@ -57,7 +57,7 @@ nm_ref_string_equals_str (NMRefString *rstr, const char *s)
* that distinction, this function is not for you. */ * that distinction, this function is not for you. */
return rstr return rstr
? nm_streq (rstr->str, s) ? (s && nm_streq (rstr->str, s))
: (s == NULL); : (s == NULL);
} }