mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-03 07:14:34 +00:00
virt-viewer-app: main_window is part of our windows hashtable
This means that: 1) There is no need to explictly set its title separately 2) It is unref-ed when we do g_hash_table_unref(priv->windows), so it should not be unref-ed separately otherwise it is unref-ed twice! Notice that 2 was never a problem because of circular references between VirtViewerApp and VirtViewerWindow, but once the follow up patch to this one breaks the circle 2 becomes an issue. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
e7a9f9ccdb
commit
01e553d21b
@ -450,7 +450,6 @@ set_title(gpointer key,
|
||||
static void
|
||||
virt_viewer_app_set_all_window_subtitles(VirtViewerApp *app)
|
||||
{
|
||||
virt_viewer_app_set_window_subtitle(app, app->priv->main_window, 0);
|
||||
g_hash_table_foreach(app->priv->windows, set_title, app);
|
||||
}
|
||||
|
||||
@ -1225,10 +1224,6 @@ virt_viewer_app_dispose (GObject *object)
|
||||
if (priv->windows) {
|
||||
g_hash_table_unref(priv->windows);
|
||||
priv->windows = NULL;
|
||||
}
|
||||
|
||||
if (priv->main_window) {
|
||||
g_object_unref(priv->main_window);
|
||||
priv->main_window = NULL;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user