scene: Do not clamp 1x1 windows
Without the margins, they become 0x0 and we crash.
This commit is contained in:
parent
e21a3c7955
commit
19df0996f5
1 changed files with 4 additions and 0 deletions
|
@ -1587,6 +1587,10 @@ static void clamp_sides(int left, int width, int right, const uint32_t *src, uin
|
||||||
static void clamp(QImage &image, const QRect &viewport)
|
static void clamp(QImage &image, const QRect &viewport)
|
||||||
{
|
{
|
||||||
Q_ASSERT(image.depth() == 32);
|
Q_ASSERT(image.depth() == 32);
|
||||||
|
if (viewport.isEmpty()) {
|
||||||
|
image = {};
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const QRect rect = image.rect();
|
const QRect rect = image.rect();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue