[gnome-boxes/gnome-3-8] Fix glib critical at the end of non-express installs
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-8] Fix glib critical at the end of non-express installs
- Date: Mon, 29 Jul 2013 17:21:39 +0000 (UTC)
commit 95a6b0c5e252c2afbf0a31c967cbd210124218b0
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 b0814a4..4284872 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]