Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a1975d3b authored by Cyrille Berger's avatar Cyrille Berger

don't assert when there is no program selected

svn path=/trunk/koffice/; revision=939906
parent cde18560
......@@ -57,10 +57,14 @@ void KisDynamicProgramsEditor::setCurrentProgram(const QString& text)
dbgPlugins << "program changed to" << text;
delete m_currentEditor;
m_currentProgram = static_cast<KisDynamicProgram*>(m_bookmarksManager->load(text));
Q_ASSERT(m_currentProgram);
m_currentEditor = m_currentProgram->createEditor(m_dynamicProgramsEditor->frame);
m_frameVBoxLayout->addWidget(m_currentEditor);
connect(m_currentProgram, SIGNAL(programChanged()), SLOT(saveCurrentProgram()));
if(m_currentProgram)
{
m_currentEditor = m_currentProgram->createEditor(m_dynamicProgramsEditor->frame);
m_frameVBoxLayout->addWidget(m_currentEditor);
connect(m_currentProgram, SIGNAL(programChanged()), SLOT(saveCurrentProgram()));
} else {
m_currentEditor = 0;
}
}
void KisDynamicProgramsEditor::addProgram()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment