Skip to content

Instantly share code, notes, and snippets.

@ObserverHerb
Created November 23, 2016 22:04
Show Gist options
  • Save ObserverHerb/65c04e914048cfa66cb5264f7e5198a1 to your computer and use it in GitHub Desktop.
Save ObserverHerb/65c04e914048cfa66cb5264f7e5198a1 to your computer and use it in GitHub Desktop.
Correct dev-qt/qt-creator-3.6.1 segfault
--- qt-creator-opensource-src-3.6.1/src/plugins/coreplugin/variablechooser.cpp 2016-03-08 06:30:19.000000000 -0500
+++ qt-creator-opensource-src-3.6.1/src/plugins/coreplugin/variablechooser.cppb 2016-11-22 22:00:19.583860319 -0500
@@ -250,9 +250,9 @@
m_defaultDescription = VariableChooser::tr("Select a variable to insert.");
m_variableTree = new VariableTreeView(q, this);
- m_variableTree->setModel(&m_model);
-
m_variableDescription = new QLabel(q);
+
+ m_variableTree->setModel(&m_model);
m_variableDescription->setText(m_defaultDescription);
m_variableDescription->setMinimumSize(QSize(0, 60));
m_variableDescription->setAlignment(Qt::AlignLeft|Qt::AlignTop);
@@ -408,7 +408,8 @@
*/
void VariableChooserPrivate::updateDescription(const QModelIndex &index)
{
- m_variableDescription->setText(m_model.data(index, Qt::ToolTipRole).toString());
+ if (m_variableDescription)
+ m_variableDescription->setText(m_model.data(index, Qt::ToolTipRole).toString());
}
/*!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment