[gnome-boxes] Fix glib critical at the end of non-express installs
- From: Christophe Fergeau <teuf src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Fix glib critical at the end of non-express installs
- Date: Thu, 6 Jun 2013 13:31:59 +0000 (UTC)
commit dcb1ed2b744d393bab9871bb73e43f4d330e4be7
Author: Christophe Fergeau <cfergeau redhat com>
Date: Thu Jun 6 08:59:05 2013 +0200
Fix glib critical at the end of non-express installs
At the end of installations, regardless of if they are express
installs or not, setup_post_install_domain_config is called.
It unconditionally tries to remove 'disk_file' from the VM configuration.
However, this member is only set for express installs, it's NULL
for non-express installs, so we get glib criticals in the console
when trying to use it as if it was non-NULL.
This commit avoids this issue by checking if it's NULL before using
it, as is done in most of unattended-installer.vala
https://bugzilla.gnome.org/show_bug.cgi?id=701695
src/unattended-installer.vala | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 63d5158..f0ae6f6 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -272,10 +272,12 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
}
public override void setup_post_install_domain_config (Domain domain) {
- var path = disk_file.get_path ();
- remove_disk_from_domain_config (domain, path);
+ if (disk_file != null) {
+ var path = disk_file.get_path ();
+ remove_disk_from_domain_config (domain, path);
+ }
if (secondary_disk_file != null) {
- path = secondary_disk_file.get_path ();
+ var path = secondary_disk_file.get_path ();
remove_disk_from_domain_config (domain, path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]