Skip to content

Commit 133a6f5

Browse files
committed
Fix crash upon setting non-integer Dpi while in debug mode
Closes #15566
1 parent b779a6a commit 133a6f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/qgsmaprenderercustompainterjob.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void QgsMapRendererCustomPainterJob::start()
7474
#ifndef QT_NO_DEBUG
7575
QPaintDevice* thePaintDevice = mPainter->device();
7676
QString errMsg = QString( "pre-set DPI not equal to painter's DPI (%1 vs %2)" ).arg( thePaintDevice->logicalDpiX() ).arg( mSettings.outputDpi() );
77-
Q_ASSERT_X( qgsDoubleNear( thePaintDevice->logicalDpiX(), mSettings.outputDpi() ), "Job::startRender()", errMsg.toAscii().data() );
77+
Q_ASSERT_X( thePaintDevice->logicalDpiX() == round( mSettings.outputDpi() ), "Job::startRender()", errMsg.toAscii().data() );
7878
#endif
7979

8080
delete mLabelingEngine;

0 commit comments

Comments
 (0)