summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qgtkstyle.cpp
diff options
context:
space:
mode:
authorAndrey Volkov <amewolf@gmail.com>2014-02-12 17:54:01 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-12 20:58:11 +0100
commit7df3321f934e5bd618e2ad00bf801f2b7edd31df (patch)
treeaa2aa2bb7253af8d1464d6e76a637ff501531c83 /src/widgets/styles/qgtkstyle.cpp
parent93500422d120d1090e60f6d1c0ad75fe30d4e806 (diff)
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>
Diffstat (limited to 'src/widgets/styles/qgtkstyle.cpp')
-rw-r--r--src/widgets/styles/qgtkstyle.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/styles/qgtkstyle.cpp b/src/widgets/styles/qgtkstyle.cpp
index b981aef98b..105aefb14c 100644
--- a/src/widgets/styles/qgtkstyle.cpp
+++ b/src/widgets/styles/qgtkstyle.cpp
@@ -2499,7 +2499,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,