[geary/wip/controller-cleanup: 9/9] Fix application controller construction race



commit bb1085287692d5601d4cae1cb7c5bea813cf85c7
Author: Michael Gratton <mike vee net>
Date:   Sun Apr 21 15:50:16 2019 +1000

    Fix application controller construction race
    
    Fix multiple controller instances being constructed if multiple actions
    are executed at once.

 src/client/application/geary-application.vala | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index f71966ea..69d00b97 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -660,9 +660,7 @@ public class GearyApplication : Gtk.Application {
     // Presents a main window. If the controller is not open, opens it
     // first.
     private async void present() {
-        if (this.controller == null) {
-            yield create_controller();
-        }
+        yield create_controller();
         this.controller.main_window.present();
     }
 


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