Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Map: Fix unsafe reference to unique_ptr
The scheduled template loading event is bound to the lifetime of the template object, but the lambda captures a reference to the unique_ptr owning the template. The lifetime of the unique_ptr can end before the lifetime of the pointed-to object when ownership is transferred to another unique_ptr. Here, this is triggered when the the template container reallocates memory due to insertion. We can safely capture a raw pointer to the template instead. Fixes GH-1893 (crash on early location display toggle).
- Loading branch information