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.

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;
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