Commit b6d2fa75 authored by Halla Rempt's avatar Halla Rempt
Browse files

Check whether we have an image before dereferencing

Everywhere in KisDoc2 we check whether we've got an image before using
except in these two places.

parent 1e31a73a
......@@ -177,7 +177,9 @@ QByteArray KisDoc2::mimeType() const
void KisDoc2::slotLoadingFinished() {
if (m_d->image) {
......@@ -464,6 +466,7 @@ void KisDoc2::showErrorAndDie()
void KisDoc2::paintContent(QPainter& painter, const QRect& rc)
if (!m_d->image) return;
KisConfig cfg;
const KoColorProfile *profile = cfg.displayProfile();
QRect rect = rc & m_d->image->bounds();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment