From 1e0ca9f7557acbf0464b7aa623d5ae30da27a4aa Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Wed, 14 Nov 2018 23:04:56 +0500 Subject: [PATCH] resolve possible null pointer dereference [lib/db_temp.cpp:104] -> [lib/db_temp.cpp:103]: (warning) Either the condition 'if(temp)' is redundant or there is possible null pointer dereference: temp. --- lib/db_temp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db_temp.cpp b/lib/db_temp.cpp index 42aa5dd8..22c62799 100644 --- a/lib/db_temp.cpp +++ b/lib/db_temp.cpp @@ -100,8 +100,8 @@ void db_temp::newItem() tr("Preset Template values"), QString()); if (dlg->exec()) { temp = new pki_temp(ic->currentPkiItem()); - temp->pkiSource = generated; if (temp) { + temp->pkiSource = generated; if (runTempDlg(temp)) { insertPKI(temp); createSuccess(temp);