Fix SEGV caused by null parent widget. This solves issue #2.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/3/head
Michele Calgaro 2 months ago
parent 3b55534c64
commit 8a2ee95b71
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -4620,7 +4620,7 @@ bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev)
if ( obj->inherits("TQLineEdit") ) {
TQWidget* widget = static_cast<TQWidget*>(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))

Loading…
Cancel
Save