qt: fix potential use after free
If I interpreted it correctly,
- When
m_reader->abandon
is called, it schedules the object for deletion. - The unique pointer
TaskHandle<SVGColorImageReader> m_reader
may try to dereference the internal pointer, which may no longer point to a validSVGColorImageReader
instance (in order to callabandon
method again).
Also, I added a check in (see the comments, this should not be necessary)handleImageRead
to not allow null pointer dereference.
Edited by Fatih Uzunoğlu