Fix crash on debug output of null QColorSpace
Change-Id: I7d1d20d7dc2c5ac10dbe8d0a0b4111e8198bfabf Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
10f39c908d
commit
4d391514b0
@ -784,10 +784,12 @@ QDebug operator<<(QDebug dbg, const QColorSpace &colorSpace)
|
||||
QDebugStateSaver saver(dbg);
|
||||
dbg.nospace();
|
||||
dbg << "QColorSpace(";
|
||||
if (colorSpace.d_ptr->namedColorSpace)
|
||||
dbg << colorSpace.d_ptr->namedColorSpace << ", ";
|
||||
dbg << colorSpace.primaries() << ", " << colorSpace.transferFunction();
|
||||
dbg << ", gamma=" << colorSpace.gamma();
|
||||
if (colorSpace.d_ptr) {
|
||||
if (colorSpace.d_ptr->namedColorSpace)
|
||||
dbg << colorSpace.d_ptr->namedColorSpace << ", ";
|
||||
dbg << colorSpace.primaries() << ", " << colorSpace.transferFunction();
|
||||
dbg << ", gamma=" << colorSpace.gamma();
|
||||
}
|
||||
dbg << ')';
|
||||
return dbg;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user