Emit last to avoid use after delete crash
authorKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 14 Oct 2020 16:35:12 +0000 (18:35 +0200)
committerCamila (Rebase PR Action) <hello@camila.codes>
Mon, 19 Oct 2020 14:33:19 +0000 (14:33 +0000)
commite502e719267370f2920d2eb7efc14d34388ff850
tree289714376bcd29b594c6fa05c841735e0cf31e0a
parent3329df4caf4f2351c8b1c694fc6f4d5a5f5678ed
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>
src/gui/sharemanager.cpp