Make compile
Fix crash due to use of dangling pointer

When QObject::destroyed is emitted the d pointer is no longer valid.
However, we used to dereference it and therefore crash