summaryrefslogtreecommitdiff
path: root/gtk/gtkfontdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-10-31 15:33:48 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-10-31 16:40:54 -0400
commit030e8c0bf9ce05d078af59557b78da937a4c7ff1 (patch)
tree611ba292ca611a56870c18c645d4f6bc762beca4 /gtk/gtkfontdialog.c
parent4b29972d31b7873d299d460ea3d5c1e035439204 (diff)
downloadgtk+-030e8c0bf9ce05d078af59557b78da937a4c7ff1.tar.gz
Be consistent in preconditions for async API
Do the same checks in all our finish functions.
Diffstat (limited to 'gtk/gtkfontdialog.c')
-rw-r--r--gtk/gtkfontdialog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkfontdialog.c b/gtk/gtkfontdialog.c
index f51633715c..169b4a6029 100644
--- a/gtk/gtkfontdialog.c
+++ b/gtk/gtkfontdialog.c
@@ -691,6 +691,7 @@ gtk_font_dialog_choose_family_finish (GtkFontDialog *self,
GError **error)
{
g_return_val_if_fail (GTK_IS_FONT_DIALOG (self), NULL);
+ g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_family, NULL);
return g_task_propagate_pointer (G_TASK (result), error);
@@ -769,6 +770,7 @@ gtk_font_dialog_choose_face_finish (GtkFontDialog *self,
GError **error)
{
g_return_val_if_fail (GTK_IS_FONT_DIALOG (self), NULL);
+ g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_face, NULL);
return g_task_propagate_pointer (G_TASK (result), NULL);
@@ -845,6 +847,7 @@ gtk_font_dialog_choose_font_finish (GtkFontDialog *self,
GError **error)
{
g_return_val_if_fail (GTK_IS_FONT_DIALOG (self), NULL);
+ g_return_val_if_fail (g_task_is_valid (result, self), NULL);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_font, NULL);
return g_task_propagate_pointer (G_TASK (result), NULL);
@@ -932,6 +935,7 @@ gtk_font_dialog_choose_font_and_features_finish (GtkFontDialog *self,
FontResult *font_result;
g_return_val_if_fail (GTK_IS_FONT_DIALOG (self), FALSE);
+ g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
g_return_val_if_fail (g_task_get_source_tag (G_TASK (result)) == gtk_font_dialog_choose_font_and_features, FALSE);
font_result = g_task_propagate_pointer (G_TASK (result), error);