[gnome-disk-utility] Fix incorrect assertions that were recently added
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Fix incorrect assertions that were recently added
- Date: Mon, 21 Sep 2015 16:40:46 +0000 (UTC)
commit 988f64e9203fc1ddfe7673da4e165caf5ca4ad87
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Fri Sep 18 09:53:07 2015 -0500
Fix incorrect assertions that were recently added
Fixes crash when using or closing the benchmark and SMART dialogs. This
was a regression from da0fbba262a5a88034793de864429fa2dc8bb38a.
https://bugzilla.gnome.org/show_bug.cgi?id=755206
src/disks/gduatasmartdialog.c | 7 ++++---
src/disks/gdubenchmarkdialog.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/disks/gduatasmartdialog.c b/src/disks/gduatasmartdialog.c
index 43e1591..d788c2f 100644
--- a/src/disks/gduatasmartdialog.c
+++ b/src/disks/gduatasmartdialog.c
@@ -1642,6 +1642,10 @@ gdu_ata_smart_dialog_show (GduWindow *window,
{
gint response;
response = gtk_dialog_run (GTK_DIALOG (data->dialog));
+
+ if (response < 0)
+ break;
+
/* Keep in sync with .ui file */
switch (response)
{
@@ -1657,9 +1661,6 @@ gdu_ata_smart_dialog_show (GduWindow *window,
default:
g_assert_not_reached ();
}
-
- if (response < 0)
- break;
}
g_source_remove (timeout_id);
diff --git a/src/disks/gdubenchmarkdialog.c b/src/disks/gdubenchmarkdialog.c
index 7baac8d..eb918bb 100644
--- a/src/disks/gdubenchmarkdialog.c
+++ b/src/disks/gdubenchmarkdialog.c
@@ -1650,6 +1650,10 @@ gdu_benchmark_dialog_show (GduWindow *window,
{
gint response;
response = gtk_dialog_run (GTK_DIALOG (data->dialog));
+
+ if (response < 0)
+ break;
+
/* Keep in sync with .ui file */
switch (response)
{
@@ -1664,9 +1668,6 @@ gdu_benchmark_dialog_show (GduWindow *window,
default:
g_assert_not_reached ();
}
-
- if (response < 0)
- break;
}
g_source_remove (timeout_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]