Increment reference count when restoring reference
Otherwise the count will be wrong after an out of memory failure in reinterpretAsFormat. Pick-to: 6.2 5.15 Fixes: QTBUG-98377 Change-Id: Ice51d47a6db9277126a5c7337e14aaf5ddee3a10 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>bb10
parent
fb33e2a8e8
commit
1a8b7eb1d4
|
|
@ -2332,6 +2332,7 @@ bool QImage::reinterpretAsFormat(Format format)
|
|||
// In case detach() ran out of memory
|
||||
if (!d) {
|
||||
d = oldD;
|
||||
d->ref.ref();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue