Fix crash if entry gets deleted
By capturing the variable by reference, it gets out of scope when the signal is triggered. This crash can be reproduced every time when deleting an entry.
By capturing the variable by reference, it gets out of scope when the signal is triggered. This crash can be reproduced every time when deleting an entry.