diff options
author | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-10-14 19:35:12 +0300 |
---|---|---|
committer | Camila (Rebase PR Action) <hello@camila.codes> | 2020-10-19 17:33:19 +0300 |
commit | e502e719267370f2920d2eb7efc14d34388ff850 (patch) | |
tree | 289714376bcd29b594c6fa05c841735e0cf31e0a /src/gui | |
parent | 3329df4caf4f2351c8b1c694fc6f4d5a5f5678ed (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.cpp | 3 |
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) |