Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-10-14 19:35:12 +0300
committerCamila (Rebase PR Action) <hello@camila.codes>2020-10-19 17:33:19 +0300
commite502e719267370f2920d2eb7efc14d34388ff850 (patch)
tree289714376bcd29b594c6fa05c841735e0cf31e0a /src/gui
parent3329df4caf4f2351c8b1c694fc6f4d5a5f5678ed (diff)
Emit last to avoid use after delete crash
It turns out the shareDeleted() signal is connected to a function cleaning up the ShareLinkWidget holding the last shared pointer to the Share object. Since we use member variables for calling updateFolder() this would lead to using deleted objects. Just swap the call and the signal to have everything back in order. Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/sharemanager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/sharemanager.cpp b/src/gui/sharemanager.cpp
index 2b8fbd4a9..87df91350 100644
--- a/src/gui/sharemanager.cpp
+++ b/src/gui/sharemanager.cpp
@@ -133,9 +133,8 @@ void Share::deleteShare()
void Share::slotDeleted()
{
- emit shareDeleted();
-
updateFolder(_account, _path);
+ emit shareDeleted();
}
void Share::slotOcsError(int statusCode, const QString &message)