Fix crash when part not loaded

master
Timothy Pearson 12 years ago
parent 1b1ebb5f66
commit 5e3618366d

@ -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();
}
}
}
}

Loading…
Cancel
Save