Fix crash when double clicking an empty area or double clicking without selection in the treeview