From 2589e35ad5962b91eceb60804b6d83b178a49b98 Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Tue, 7 Feb 2017 15:53:44 -0500 Subject: [PATCH] [Companion] Fix crash when converting radio splash image to RGB32 (closes #4420). --- companion/src/helpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 67ecd8b15..f8c3ff65a 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -854,8 +854,8 @@ QPixmap makePixMap(const QImage & image) QImage result = image.scaled(firmware->getCapability(LcdWidth), firmware->getCapability(LcdHeight)); if (firmware->getCapability(LcdDepth) == 4) { result = result.convertToFormat(QImage::Format_RGB32); - for (int i = 0; i < image.width(); ++i) { - for (int j = 0; j < image.height(); ++j) { + for (int i = 0; i < result.width(); ++i) { + for (int j = 0; j < result.height(); ++j) { QRgb col = result.pixel(i, j); int gray = qGray(col); result.setPixel(i, j, qRgb(gray, gray, gray));