color/fontdialogbutton: Fix constructors

The arguments were meant to be nullable.
Make it so!

Fixes: #5321
This commit is contained in:
Matthias Clasen 2022-11-06 14:12:02 +01:00
parent baac6ef871
commit 466db31aac
2 changed files with 2 additions and 2 deletions

View File

@ -401,7 +401,7 @@ gtk_color_dialog_button_new (GtkColorDialog *dialog)
{
GtkWidget *self;
g_return_val_if_fail (GTK_IS_COLOR_DIALOG (dialog), NULL);
g_return_val_if_fail (dialog == NULL || GTK_IS_COLOR_DIALOG (dialog), NULL);
self = g_object_new (GTK_TYPE_COLOR_DIALOG_BUTTON,
"dialog", dialog,

View File

@ -697,7 +697,7 @@ gtk_font_dialog_button_new (GtkFontDialog *dialog)
{
GtkWidget *self;
g_return_val_if_fail (GTK_IS_FONT_DIALOG (dialog), NULL);
g_return_val_if_fail (dialog == NULL || GTK_IS_FONT_DIALOG (dialog), NULL);
self = g_object_new (GTK_TYPE_FONT_DIALOG_BUTTON,
"dialog", dialog,