[dconf-editor] Avoid infinite loop.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Avoid infinite loop.
- Date: Thu, 3 Mar 2016 08:18:48 +0000 (UTC)
commit a58342c07e5344c1b64b03588e57125ba49c7661
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Mar 3 09:08:18 2016 +0100
Avoid infinite loop.
editor/dconf-window.vala | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index f342bd5..92cbd3b 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -248,20 +248,19 @@ class DConfWindow : ApplicationWindow
private void reset_generic (GLib.ListStore objects, bool recursively)
{
- uint position = 0;
- do
+ for (uint position = 0;; position++)
{
Object? object = key_model.get_object (position);
if (object == null)
return;
+
SettingObject setting_object = (SettingObject) ((!) object);
/* if (recursively && setting_object.is_view)
reset_generic (((Directory) setting_object).key_model, true);
else */ if (setting_object.is_view || !((Key) setting_object).has_schema)
continue;
((GSettingsKey) setting_object).set_to_default ();
- position++;
- } while (true);
+ }
}
/*\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]