colordialogbutton: Actually accept NULL

As pointed out in #5321, my previous fix was not
good enough.

Fixes: #5321
This commit is contained in:
Matthias Clasen 2022-11-07 15:24:13 +01:00
parent 18ee4d97fc
commit e00b96053b

View File

@ -449,7 +449,7 @@ gtk_color_dialog_button_set_dialog (GtkColorDialogButton *self,
GtkColorDialog *dialog)
{
g_return_if_fail (GTK_IS_COLOR_DIALOG_BUTTON (self));
g_return_if_fail (GTK_IS_COLOR_DIALOG (dialog));
g_return_if_fail (dialog == NULL || GTK_IS_COLOR_DIALOG (dialog));
if (!g_set_object (&self->dialog, dialog))
return;