From 91a45a216c4a2c3a3e688a5a598800b777a8c9be Mon Sep 17 00:00:00 2001 From: mbudd02 Date: Tue, 18 May 2021 18:21:29 -0400 Subject: [PATCH] cppcheck fixes. --- src/drivers/Qt/GamePadConf.cpp | 4 ++-- src/drivers/Qt/GuiConf.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/Qt/GamePadConf.cpp b/src/drivers/Qt/GamePadConf.cpp index 00324cc7..53266fe9 100644 --- a/src/drivers/Qt/GamePadConf.cpp +++ b/src/drivers/Qt/GamePadConf.cpp @@ -449,7 +449,7 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent) connect(editKeyBindBtn, SIGNAL(clicked()), this, SLOT(editKeyBindingCallback(void))); connect( delKeyBindBtn, SIGNAL(clicked()), this, SLOT(delKeyBindingCallback(void))); - if (useScroll) + if (useScroll && (scroll != NULL) ) { scroll->setWidget(mainWidget); scroll->setWidgetResizable(true); @@ -460,7 +460,7 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent) QHBoxLayout *dialogLayout = new QHBoxLayout(); - if (useScroll) + if (useScroll && (scroll != NULL) ) { dialogLayout->addWidget(scroll); } diff --git a/src/drivers/Qt/GuiConf.cpp b/src/drivers/Qt/GuiConf.cpp index 06837cc8..ac2813cd 100644 --- a/src/drivers/Qt/GuiConf.cpp +++ b/src/drivers/Qt/GuiConf.cpp @@ -1301,7 +1301,7 @@ void GuiPaletteColorSelect::setText(void) rTxt = getRoleText( role ); - if ( rTxt == NULL ) + if ( (gTxt == NULL) || (rTxt == NULL) ) { return; }