mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-28 15:20:49 +00:00
SessionSpice: Protect against unreffing window twice
In theory, the dispose method can be called multiple times, so any member variables that are unreffed should be set to NULL so that we don't accidentally unref them multiple times.
This commit is contained in:
parent
d316c04345
commit
f0c6bb27f4
@ -145,8 +145,7 @@ virt_viewer_session_spice_dispose(GObject *obj)
|
||||
|
||||
spice->priv->audio = NULL;
|
||||
|
||||
if (spice->priv->main_window)
|
||||
g_object_unref(spice->priv->main_window);
|
||||
g_clear_object(&spice->priv->main_window);
|
||||
|
||||
G_OBJECT_CLASS(virt_viewer_session_spice_parent_class)->dispose(obj);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user