13
0

Amend bb54bc0d (prevent bad_weak_ptr)

This commit is contained in:
Robin Gareus 2023-06-10 04:00:46 +02:00
parent 884b4f3046
commit a3e64445de
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1564,9 +1564,12 @@ Region::source_deleted (std::weak_ptr<Source>)
* in this object being deleted (as refcnt goes to zero)
* while emitting DropReferences.
*/
std::shared_ptr<Region> me (shared_from_this ());
drop_references ();
try {
std::shared_ptr<Region> me (shared_from_this ());
drop_references ();
} catch (...) {
/* relax */
}
}
}