Commit dea45823 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Don't try to generate LoD cache when the source device is empty

Our "empty" devices have a weird extent (qintmax, qintmax, 0, 0),
which makes the LoD generation algorithm crash when it tries to read
from qintmax-tile. So we should just check it.

BUG:408785
parent 232f1c29
...@@ -698,6 +698,8 @@ void KisPaintDevice::Private::updateLodDataManager(KisDataManager *srcDataManage ...@@ -698,6 +698,8 @@ void KisPaintDevice::Private::updateLodDataManager(KisDataManager *srcDataManage
const QRect &originalRect, const QRect &originalRect,
int lod) int lod)
{ {
if (originalRect.isEmpty()) return;
const int srcStepSize = 1 << lod; const int srcStepSize = 1 << lod;
KIS_ASSERT_RECOVER_RETURN(lod > 0); KIS_ASSERT_RECOVER_RETURN(lod > 0);
......
Markdown is supported
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