Fix segfault on delete of last save. Bug #20845