Only send action if self.lastFile is not nil to prevent crashes when a new assistent editor is opened