mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Fix crash when device with capacitybar is dragged
BUG: 430441
This commit is contained in:
parent
c03b43b4a1
commit
ef09315404
|
@ -106,7 +106,8 @@ void PlacesItemListWidget::paint(QPainter* painter, const QStyleOptionGraphicsIt
|
||||||
{
|
{
|
||||||
KStandardItemListWidget::paint(painter, option, widget);
|
KStandardItemListWidget::paint(painter, option, widget);
|
||||||
|
|
||||||
if (m_drawCapacityBar) {
|
// We check if option=nullptr since it is null when the place is dragged (Bug #430441)
|
||||||
|
if (m_drawCapacityBar && option) {
|
||||||
const TextInfo* textInfo = m_textInfo.value("text");
|
const TextInfo* textInfo = m_textInfo.value("text");
|
||||||
if (textInfo) { // See KStandarItemListWidget::paint() for info on why we check textInfo.
|
if (textInfo) { // See KStandarItemListWidget::paint() for info on why we check textInfo.
|
||||||
painter->save();
|
painter->save();
|
||||||
|
|
Loading…
Reference in a new issue