forked from qt-creator/qt-creator
Fix crash in insertSideBarWidget
Change-Id: I7c35fe859b0364a7cd9cc5c4be6af60ab27cde17 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -203,7 +203,8 @@ SideBarItem *SideBar::item(const QString &id)
|
|||||||
|
|
||||||
Internal::SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &id)
|
Internal::SideBarWidget *SideBar::insertSideBarWidget(int position, const QString &id)
|
||||||
{
|
{
|
||||||
d->m_widgets.at(0)->setCloseIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
|
if (!d->m_widgets.isEmpty())
|
||||||
|
d->m_widgets.at(0)->setCloseIcon(QIcon(QLatin1String(Constants::ICON_CLOSE_SPLIT_BOTTOM)));
|
||||||
|
|
||||||
Internal::SideBarWidget *item = new Internal::SideBarWidget(this, id);
|
Internal::SideBarWidget *item = new Internal::SideBarWidget(this, id);
|
||||||
connect(item, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
|
connect(item, SIGNAL(splitMe()), this, SLOT(splitSubWidget()));
|
||||||
|
Reference in New Issue
Block a user