Commit c81ddf8f authored by Bill King's avatar Bill King
Browse files

Fix insufficient null checking.

parent 7ccfd479
...@@ -880,6 +880,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor) ...@@ -880,6 +880,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor)
emit editorAboutToClose(editor); emit editorAboutToClose(editor);
if(m_d->m_splitter->findView(editor)) {
EditorView *view = m_d->m_splitter->findView(editor)->view(); EditorView *view = m_d->m_splitter->findView(editor)->view();
removeEditor(editor); removeEditor(editor);
view->removeEditor(editor); view->removeEditor(editor);
...@@ -894,6 +895,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor) ...@@ -894,6 +895,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor)
if (idx.isValid()) if (idx.isValid())
activateEditor(idx, view, NoActivate); activateEditor(idx, view, NoActivate);
} }
}
emit editorsClosed(QList<IEditor*>() << editor); emit editorsClosed(QList<IEditor*>() << editor);
delete editor; delete editor;
......
...@@ -223,8 +223,8 @@ QList<BuildConfigWidget *> BuildSettingsWidget::subWidgets() const ...@@ -223,8 +223,8 @@ QList<BuildConfigWidget *> BuildSettingsWidget::subWidgets() const
void BuildSettingsWidget::updateAddButtonMenu() void BuildSettingsWidget::updateAddButtonMenu()
{ {
m_addButtonMenu->clear(); m_addButtonMenu->clear();
if (m_target && if (m_target) {
m_target->activeBuildConfiguration()) { if (m_target->activeBuildConfiguration()) {
m_addButtonMenu->addAction(tr("&Clone Selected"), m_addButtonMenu->addAction(tr("&Clone Selected"),
this, SLOT(cloneConfiguration())); this, SLOT(cloneConfiguration()));
} }
...@@ -235,6 +235,7 @@ void BuildSettingsWidget::updateAddButtonMenu() ...@@ -235,6 +235,7 @@ void BuildSettingsWidget::updateAddButtonMenu()
action->setData(id); action->setData(id);
} }
} }
}
} }
void BuildSettingsWidget::updateBuildSettings() void BuildSettingsWidget::updateBuildSettings()
......
...@@ -1118,10 +1118,11 @@ void MyGroupBox::paintEvent(QPaintEvent * event) ...@@ -1118,10 +1118,11 @@ void MyGroupBox::paintEvent(QPaintEvent * event)
QGroupBox::paintEvent(event); QGroupBox::paintEvent(event);
if (m_animated) { if (m_animated) {
QPainter p(this); QPainter p(this);
if (!m_pixmap.isNull() && !m_firstExpand) {
p.setOpacity(m_alpha); p.setOpacity(m_alpha);
if (!m_pixmap.isNull() && !m_firstExpand)
p.drawPixmap(5, 5, m_pixmap.width(), m_pixmap.height(), m_pixmap); p.drawPixmap(5, 5, m_pixmap.width(), m_pixmap.height(), m_pixmap);
} }
}
} }
void MyGroupBox::setVisible ( bool visible ) void MyGroupBox::setVisible ( bool visible )
......
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