Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
b5afd73c by Alexandre Janniaux at 2024-03-19T09:44:16+00:00
qt: flickable_scroll_handler: fix uninitialized variables
setScaleFactor(1.0) was called from the constructor, but then it would
call qFuzzyCompare() with the current scale factor which was not
initialized.
==2600289== Thread 10 vlc-qt:
==2600289== Conditional jump or move depends on uninitialised value(s)
==2600289== at 0xE8E56F1: qFuzzyCompare (qglobal.h:904)
==2600289== by 0xE8E56F1: ??? (flickable_scroll_handler.cpp:253)
==2600289== by 0xE8E67EB: ??? (flickable_scroll_handler.cpp:36)
==2600289== by 0xE1F5B76: QQmlElement (qqmlprivate.h:139)
==2600289== by 0xE1F5B76: ??? (qqmlprivate.h:166)
==2600289== by 0x104BE4AA: QQmlType::create(QObject**, void**, unsigned
long) const (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x10502AE2: QQmlObjectCreator::createInstance(int,
QObject*, bool) (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x105030AE: QQmlObjectCreator::create(int, QObject*,
QQmlInstantiationInterrupt*, int) (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x10502A04: QQmlObjectCreator::createInstance(int,
QObject*, bool) (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x10503B4C:
QQmlObjectCreator::setPropertyBinding(QQmlPropertyData const*,
QV4::CompiledData::Binding const*) (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x105050BF: QQmlObjectCreator::setupBindings(bool) (in
/usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x10509185: QQmlObjectCreator::populateInstance(int,
QObject*, QObject*, QQmlPropertyData const*) (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x105026B5: QQmlObjectCreator::createInstance(int,
QObject*, bool) (in /usr/lib/libQt5Qml.so.5.15.12)
==2600289== by 0x105030AE: QQmlObjectCreator::create(int, QObject*,
QQmlInstantiationInterrupt*, int) (in /usr/lib/libQt5Qml.so.5.15.12)
- - - - -
2 changed files:
- modules/gui/qt/util/flickable_scroll_handler.cpp
- modules/gui/qt/util/flickable_scroll_handler.hpp
Changes:
=====================================
modules/gui/qt/util/flickable_scroll_handler.cpp
=====================================
@@ -33,7 +33,7 @@ FlickableScrollHandler::FlickableScrollHandler(QObject
*parent)
emit effectiveScaleFactorChanged();
});
- setScaleFactor(1.0);
+ emit scaleFactorChanged();
}
FlickableScrollHandler::~FlickableScrollHandler()
=====================================
modules/gui/qt/util/flickable_scroll_handler.hpp
=====================================
@@ -74,7 +74,7 @@ private:
private:
QPointer<QQuickItem> m_target = nullptr;
- qreal m_scaleFactor;
+ qreal m_scaleFactor = 1.;
qreal m_effectiveScaleFactor;
bool m_enabled = true;
bool m_fallbackScroll = false;
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/b5afd73c86dc665c1becf92ea4bd2a520bc6458e
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/b5afd73c86dc665c1becf92ea4bd2a520bc6458e
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits