Fix crash in QAXRWidget when document is null.