From 5e3618366d86220c66e38d764aa80db1314ceabc Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 17 Sep 2012 20:51:12 -0500 Subject: Fix crash when part not loaded --- clients/tde/src/app/views/instrumentview.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'clients/tde/src/app') diff --git a/clients/tde/src/app/views/instrumentview.cpp b/clients/tde/src/app/views/instrumentview.cpp index e9f3f51..dc4e3ad 100644 --- a/clients/tde/src/app/views/instrumentview.cpp +++ b/clients/tde/src/app/views/instrumentview.cpp @@ -45,7 +45,7 @@ void InstrumentView::init() { KLibFactory *factory = KLibLoader::self()->factory(m_libraryName.ascii()); if (!factory) { - KMessageBox::error( this, i18n("TDE could not find the %1 Part, or the Remote Laboratory Communications Analyzer Part could not be started. Did you make install?").arg(m_libraryName) ); + KMessageBox::error( this, i18n("TDE could not find the %1 part, or the %2 part could not be started.").arg(m_libraryName).arg(m_libraryName) ); TQTimer::singleShot(0, this, SLOT(close())); } else { @@ -62,11 +62,13 @@ void InstrumentView::init() { } bool InstrumentView::eventFilter(TQObject *o, TQEvent *e) { - TQWidget *childPartWidget = m_instrumentPart->widget(); - if (childPartWidget) { - if (o == childPartWidget) { - if ((e->type() == TQEvent::Resize) || (e->type() == TQEvent::LayoutHint)) { - setChildSizeData(); + if (m_instrumentPart) { + TQWidget *childPartWidget = m_instrumentPart->widget(); + if (childPartWidget) { + if (o == childPartWidget) { + if ((e->type() == TQEvent::Resize) || (e->type() == TQEvent::LayoutHint)) { + setChildSizeData(); + } } } } -- cgit v1.2.1