Check pointer to prevent memory leak.
--HG-- branch : develop
This commit is contained in:
parent
d038a22aa3
commit
7b23e89237
|
@ -453,6 +453,8 @@ QTreeWidgetItem *DialogMDataBase::AddGroup(const QString &text)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogMDataBase::AddMeasurement(QTreeWidgetItem *group, const QString &name, const QStringList &list)
|
void DialogMDataBase::AddMeasurement(QTreeWidgetItem *group, const QString &name, const QStringList &list)
|
||||||
{
|
{
|
||||||
|
SCASSERT(group != nullptr)
|
||||||
|
|
||||||
QTreeWidgetItem *m = new QTreeWidgetItem(group);
|
QTreeWidgetItem *m = new QTreeWidgetItem(group);
|
||||||
|
|
||||||
if (selectMode)
|
if (selectMode)
|
||||||
|
|
|
@ -180,6 +180,8 @@ void TapeConfigDialog::createIcons()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void TapeConfigDialog::createIcon(const QString &icon, const QString &text)
|
void TapeConfigDialog::createIcon(const QString &icon, const QString &text)
|
||||||
{
|
{
|
||||||
|
SCASSERT(contentsWidget != nullptr)
|
||||||
|
|
||||||
QListWidgetItem *button = new QListWidgetItem(contentsWidget);
|
QListWidgetItem *button = new QListWidgetItem(contentsWidget);
|
||||||
button->setIcon(QIcon(icon));
|
button->setIcon(QIcon(icon));
|
||||||
button->setText(text);
|
button->setText(text);
|
||||||
|
|
|
@ -181,6 +181,8 @@ void ConfigDialog::createIcons()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void ConfigDialog::createIcon(const QString &icon, const QString &text)
|
void ConfigDialog::createIcon(const QString &icon, const QString &text)
|
||||||
{
|
{
|
||||||
|
SCASSERT(contentsWidget != nullptr)
|
||||||
|
|
||||||
QListWidgetItem *button = new QListWidgetItem(contentsWidget);
|
QListWidgetItem *button = new QListWidgetItem(contentsWidget);
|
||||||
button->setIcon(QIcon(icon));
|
button->setIcon(QIcon(icon));
|
||||||
button->setText(text);
|
button->setText(text);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user