Fix crash when closing note editor

check for model change was causing crash when adding new note