Crash on exit when layer dialog was opened
Steps to reproduce:
- open Inkscape
- open layer dialog
- close Inkscape
What happened?
Inkscape crashes.
What should have happened?
Inkscape should not crash
Inkscape Version and Operating System:
- Inkscape Version: git master
- Operating System: Linux
- Operating System version: Debian/sid
What is actually happening
When closing Inkscape, in src/ui/dialog/layers.cpp
the function _layersChanged()
gets called. There document
gets dereferenced, which at this point in time is NULL
. Thus it segfaults. A quick bandaid is to check for NULL
, but to me it seems that the overall logic of the control flow is wrong. I am not knowing Inkscape good enough to provide a real fix myself or analyse this in more depth.