fix: segfault after close settings dialog if previous tab was closed