To reproduce:
- Open a new document and be sure to have OpenGL active
- Open a view on that document
- Draw with a slow brush
- While it's still drawing, quickly close the inactive view
Crashlog: https://paste.kde.org/pos5togoz
This also shows another issue i was talking about with boud.. we really should be using weak shared ptr only after acquiring them as temporary shared pointer, since they're not thread safe (in the sense that if i check if it's valid, the line after the check it can be invalid already; with a shared pointer this doesn't happen, it's either one or the other and it will be in that state until released).