display: Add failure returns into CcDisplayConfig

This guards against accidental use of NULL pointers so that the panel
will hopefully not crash if new bugs like this are introduced.
This commit is contained in:
Benjamin Berg 2019-07-03 09:52:42 +02:00 committed by Georges Basile Stavracas Neto
parent e1cd43cb48
commit 561ac849d7
2 changed files with 28 additions and 0 deletions

View file

@ -1055,6 +1055,9 @@ cc_display_config_dbus_equal (CcDisplayConfig *pself,
CcDisplayConfigDBus *other = CC_DISPLAY_CONFIG_DBUS (pother);
GList *l;
g_return_val_if_fail (pself, FALSE);
g_return_val_if_fail (pother, FALSE);
cc_display_config_dbus_ensure_non_offset_coords (self);
cc_display_config_dbus_ensure_non_offset_coords (other);