GNotification: Fix wrong NULL check in set_body()

According to the docs `g_notification_set_body()` takes also no body, so
make sure the body string isn't "" but allow passing NULL.
This commit is contained in:
Julian Sparber 2024-04-30 09:28:44 +02:00
parent ba1b29d1b6
commit ccae74e208

View File

@ -260,7 +260,7 @@ g_notification_set_body (GNotification *notification,
const gchar *body)
{
g_return_if_fail (G_IS_NOTIFICATION (notification));
g_return_if_fail (body != NULL);
g_return_if_fail (body == NULL || *body != '\0');
g_free (notification->body);