From 8a2ee95b7119397c1d2f680b478ba8bb2dde7ac0 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 22 Mar 2024 11:58:14 +0900 Subject: Fix SEGV caused by null parent widget. This solves issue #2. Signed-off-by: Michele Calgaro --- style/polyester.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'style/polyester.cpp') diff --git a/style/polyester.cpp b/style/polyester.cpp index 7fe513d..95ac235 100755 --- a/style/polyester.cpp +++ b/style/polyester.cpp @@ -4620,7 +4620,7 @@ bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev) if ( obj->inherits("TQLineEdit") ) { TQWidget* widget = static_cast(obj); - if ( widget->parentWidget()->inherits("TQSpinWidget") ) + if ( widget->parentWidget() && widget->parentWidget()->inherits("TQSpinWidget") ) { TQWidget* spinbox = widget->parentWidget(); if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut)) -- cgit v1.2.3