[libgames-support] scores: Add precondition for run_dialog_internal()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgames-support] scores: Add precondition for run_dialog_internal()
- Date: Sun, 22 Feb 2015 19:18:56 +0000 (UTC)
commit 5852f995778eaba4ead76855ed080c6970728029
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Feb 22 13:13:05 2015 -0600
scores: Add precondition for run_dialog_internal()
scores/context.vala | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/scores/context.vala b/scores/context.vala
index d61cd29..96a7bbc 100644
--- a/scores/context.vala
+++ b/scores/context.vala
@@ -291,6 +291,7 @@ public class Context : Object
}
internal void run_dialog_internal (Score? new_high_score)
+ requires (game_window != null)
{
if (!scores_loaded_from_file)
{
@@ -305,12 +306,9 @@ public class Context : Object
}
}
- if (game_window != null)
- {
- var dialog = new Dialog (this, dialog_label, style, new_high_score, current_category,
game_window);
- dialog.run ();
- dialog.destroy ();
- }
+ var dialog = new Dialog (this, dialog_label, style, new_high_score, current_category, game_window);
+ dialog.run ();
+ dialog.destroy ();
}
public void run_dialog ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]