[libdazzle] shortcuts: add assertions
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcuts: add assertions
- Date: Sun, 11 Aug 2019 03:43:03 +0000 (UTC)
commit 41be46e95412bf9da0d91455465cffb15808a927
Author: Christian Hergert <chergert redhat com>
Date: Sat Aug 10 20:42:06 2019 -0700
shortcuts: add assertions
src/shortcuts/dzl-shortcut-controller.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/src/shortcuts/dzl-shortcut-controller.c b/src/shortcuts/dzl-shortcut-controller.c
index af54f5f..03b3578 100644
--- a/src/shortcuts/dzl-shortcut-controller.c
+++ b/src/shortcuts/dzl-shortcut-controller.c
@@ -389,6 +389,8 @@ dzl_shortcut_controller_set_widget (DzlShortcutController *self,
dzl_shortcut_controller_connect (self);
}
+ g_assert (widget == priv->widget);
+
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_WIDGET]);
}
}
@@ -655,6 +657,8 @@ dzl_shortcut_controller_find (GtkWidget *widget)
controller = g_object_get_qdata (G_OBJECT (widget), controller_quark);
}
+ g_return_val_if_fail (DZL_IS_SHORTCUT_CONTROLLER (controller), NULL);
+
return controller;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]