Fix crash when opening a file after a notification has been dismissed