[gnome-games] display-view: Crash when the runner is null



commit ec84ba1a13517d214d13a9ef849725ccb82b99a0
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Apr 1 22:31:28 2020 +0500

    display-view: Crash when the runner is null
    
    There's no point in showing a message there, it's clearly a bug in the code
    if the runner is null and it only serves to confuse translators.

 src/ui/display-view.vala | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index 729d22a6..02cffb21 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -359,12 +359,8 @@ private class Games.DisplayView : Object, UiView {
        private Runner? try_get_runner (Game game) {
                var collection = Application.get_default ().get_collection ();
                var runner = collection.create_runner (game);
-               if (runner == null) {
-                       reset_display_page ();
-                       box.display_running_game_failed (game, _("No runner found"));
 
-                       return null;
-               }
+               assert (runner != null);
 
                try {
                        runner.prepare ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]