You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud-client/0001-CloudProviders-Don-t-c...

36 lines
1.2 KiB

From 18615d02971d6555d3720214fb6875f5bf582730 Mon Sep 17 00:00:00 2001
From: Tim Klocke <taaem@mailbox.org>
Date: Fri, 10 Apr 2020 19:03:15 +0200
Subject: [PATCH] CloudProviders: Don't clear the _recentMenu pointer
The _recentMenu pointer ref should not be freed, when building the
menu.
This fixes #1920 and #1818
---
src/gui/cloudproviders/cloudproviderwrapper.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gui/cloudproviders/cloudproviderwrapper.cpp b/src/gui/cloudproviders/cloudproviderwrapper.cpp
index f4e2a7606..421ae625a 100644
--- a/src/gui/cloudproviders/cloudproviderwrapper.cpp
+++ b/src/gui/cloudproviders/cloudproviderwrapper.cpp
@@ -69,6 +69,7 @@ CloudProviderWrapper::~CloudProviderWrapper()
g_object_unref(_cloudProviderAccount);
g_object_unref(_mainMenu);
g_object_unref(actionGroup);
+ g_object_unref(_recentMenu);
}
CloudProvidersAccountExporter* CloudProviderWrapper::accountExporter()
@@ -258,7 +259,6 @@ GMenuModel* CloudProviderWrapper::getMenuModel() {
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
g_clear_object (&section);
- g_clear_object (&_recentMenu);
return G_MENU_MODEL(_mainMenu);
}
--
2.26.0