diff --git a/gtk/gtkcolordialogbutton.c b/gtk/gtkcolordialogbutton.c index 6e0db26f01..139d9f7eb1 100644 --- a/gtk/gtkcolordialogbutton.c +++ b/gtk/gtkcolordialogbutton.c @@ -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, diff --git a/gtk/gtkfontdialogbutton.c b/gtk/gtkfontdialogbutton.c index ff466a2003..ab6c78ac92 100644 --- a/gtk/gtkfontdialogbutton.c +++ b/gtk/gtkfontdialogbutton.c @@ -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,