g_object_interface_install_property(): Do interface-specific validations first

https://bugzilla.gnome.org/show_bug.cgi?id=787551
This commit is contained in:
Federico Mena Quintero 2017-09-11 09:34:52 -05:00
parent e667d0d4c0
commit 1b08414f06

View File

@ -745,8 +745,9 @@ g_object_interface_install_property (gpointer g_iface,
GTypeInterface *iface_class = g_iface;
g_return_if_fail (G_TYPE_IS_INTERFACE (iface_class->g_type));
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
g_return_if_fail (!G_IS_PARAM_SPEC_OVERRIDE (pspec)); /* paranoid */
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
g_return_if_fail (PARAM_SPEC_PARAM_ID (pspec) == 0); /* paranoid */
g_return_if_fail (pspec->flags & (G_PARAM_READABLE | G_PARAM_WRITABLE));