Fix crash when doing edit on empty library window