diff options
author | Andrey Volkov <amewolf@gmail.com> | 2014-02-13 10:47:38 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-13 11:31:04 (GMT) |
commit | ed792d7b7cd64bce0168b4e509337a8e0408300e (patch) | |
tree | 61ecdba532d39b938d3572d366cbc7881abf8f97 | |
parent | 763f4e54a818f31b4e89c99ec10924b2738f5de6 (diff) | |
download | Qt-ed792d7b7cd64bce0168b4e509337a8e0408300e.zip Qt-ed792d7b7cd64bce0168b4e509337a8e0408300e.tar.gz Qt-ed792d7b7cd64bce0168b4e509337a8e0408300e.tar.bz2 |
fix crash when using GTK 2.14 function in old gtk
This is additional fix for bug 23569.
Previous fix (SHA1 7fcf1cf674d09d9dd1d41e2913252017f1d599ca) is not enough.
QGtkStyle was still crashing with old gtk (< 2.14)
in drawComplexControl () function.
Bug was reproducible on CentOS 5.x and Red Hat 5.x.
Current patch makes the same check as in commit mentioned but in another
line of code.
Task-number: QTBUG-23569
Change-Id: I261b61bc93ccaada879ed02ad4d0bef62935335b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Harri Porten <porten@froglogic.com>
(cherry picked from qtbase/7df3321f934e5bd618e2ad00bf801f2b7edd31df)
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index 97756ca6..ae36fa5 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -1996,7 +1996,9 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom if ((option->subControls & SC_SliderGroove) && groove.isValid()) { GtkRange *range = (GtkRange*)scaleWidget; - GtkAdjustment *adjustment = d->gtk_range_get_adjustment(range); + GtkAdjustment *adjustment = 0; + if (d->gtk_adjustment_configure) + adjustment = d->gtk_range_get_adjustment(range); if (adjustment) { d->gtk_adjustment_configure(adjustment, slider->sliderPosition, |