mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-04-24 06:50:41 +02:00
lib: Cache property values correctly
This is cleaner.
This commit is contained in:
parent
689ae112de
commit
d7d215a4b6
1 changed files with 2 additions and 1 deletions
|
|
@ -561,7 +561,8 @@ up_device_set_property (GObject *object, guint prop_id, const GValue *value, GPa
|
|||
if (device->priv->proxy_device == NULL) {
|
||||
GValue *v;
|
||||
|
||||
v = g_memdup (value, sizeof(GValue));
|
||||
v = g_new0 (GValue, 1);
|
||||
g_value_init (v, G_VALUE_TYPE (value));
|
||||
g_value_copy (value, v);
|
||||
g_hash_table_insert (device->priv->offline_props, GUINT_TO_POINTER (prop_id), v);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue