viewer: Fix traceback when closing the project
It's difficult to reproduce since it happens when the project recovery fails and we gave up. Seems a good condition to add, since __get_pipeline_position gets to the pipeline through the app.
Fixes #2129 (closed)