forked from qt-creator/qt-creator
Fix insufficient null checking.
This commit is contained in:
@@ -880,6 +880,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor)
|
||||
|
||||
emit editorAboutToClose(editor);
|
||||
|
||||
if(m_d->m_splitter->findView(editor)) {
|
||||
EditorView *view = m_d->m_splitter->findView(editor)->view();
|
||||
removeEditor(editor);
|
||||
view->removeEditor(editor);
|
||||
@@ -894,6 +895,7 @@ void EditorManager::closeDuplicate(Core::IEditor *editor)
|
||||
if (idx.isValid())
|
||||
activateEditor(idx, view, NoActivate);
|
||||
}
|
||||
}
|
||||
|
||||
emit editorsClosed(QList<IEditor*>() << editor);
|
||||
delete editor;
|
||||
|
||||
@@ -223,8 +223,8 @@ QList<BuildConfigWidget *> BuildSettingsWidget::subWidgets() const
|
||||
void BuildSettingsWidget::updateAddButtonMenu()
|
||||
{
|
||||
m_addButtonMenu->clear();
|
||||
if (m_target &&
|
||||
m_target->activeBuildConfiguration()) {
|
||||
if (m_target) {
|
||||
if (m_target->activeBuildConfiguration()) {
|
||||
m_addButtonMenu->addAction(tr("&Clone Selected"),
|
||||
this, SLOT(cloneConfiguration()));
|
||||
}
|
||||
@@ -235,6 +235,7 @@ void BuildSettingsWidget::updateAddButtonMenu()
|
||||
action->setData(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BuildSettingsWidget::updateBuildSettings()
|
||||
|
||||
@@ -1118,10 +1118,11 @@ void MyGroupBox::paintEvent(QPaintEvent * event)
|
||||
QGroupBox::paintEvent(event);
|
||||
if (m_animated) {
|
||||
QPainter p(this);
|
||||
if (!m_pixmap.isNull() && !m_firstExpand) {
|
||||
p.setOpacity(m_alpha);
|
||||
if (!m_pixmap.isNull() && !m_firstExpand)
|
||||
p.drawPixmap(5, 5, m_pixmap.width(), m_pixmap.height(), m_pixmap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MyGroupBox::setVisible ( bool visible )
|
||||
|
||||
Reference in New Issue
Block a user