Fix segfault when setting a device-pixel-ratio on a null-QPixmap
Change-Id: If3680766a50d5cf78889822d740c9472123191a7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>bb10
parent
137906da8e
commit
98a286cbde
|
|
@ -678,6 +678,9 @@ qreal QPixmap::devicePixelRatio() const
|
|||
*/
|
||||
void QPixmap::setDevicePixelRatio(qreal scaleFactor)
|
||||
{
|
||||
if (isNull())
|
||||
return;
|
||||
|
||||
detach();
|
||||
data->setDevicePixelRatio(scaleFactor);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue