Commit 34390442 authored by Niels De Graef's avatar Niels De Graef
Browse files

fakepersona: Watch out casting a GValue

Fixes https://gitlab.gnome.org/GNOME/gnome-contacts/-/issues/188

(cherry picked from commit d591157d)
parent a0ff521a
......@@ -106,7 +106,9 @@ PostalAddressDetails
public LoadableIcon? avatar {
get {
unowned Value? value = this.properties.get ("avatar");
return (LoadableIcon?) value;
// Casting a Value internally makes it use g_value_get_object(),
// which is of course not allowed for a NULL value
return (value != null)? (LoadableIcon?) value : null;
}
set {
this.properties.set ("avatar", value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment