[gnote] Fix crash when synchronizing immediately after configuring



commit ce7764b069e871b51d8b3c154343b64088974c22
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Mon Feb 15 21:44:46 2021 +0200

    Fix crash when synchronizing immediately after configuring

 src/preferencesdialog.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index fa832b82..a4350452 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2015,2017,2019-2020 Aurimas Cernius
+ * Copyright (C) 2010-2015,2017,2019-2021 Aurimas Cernius
  * Copyright (C) 2009 Debarshi Ray
  * Copyright (C) 2009 Hubert Figuiere
  *
@@ -1234,7 +1234,8 @@ namespace gnote {
 
       if(dialog_response == Gtk::RESPONSE_YES) {
         // TODO: Put this voodoo in a method somewhere
-        m_gnote.action_manager().get_app_action("sync-notes")->activate(Glib::VariantBase());
+        auto action = m_gnote.action_manager().get_app_action("sync-notes");
+        utils::main_context_invoke([action = std::move(action)]() { action->activate(Glib::VariantBase()); 
});
       }
     }
     else {


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