@@ -72,6 +72,9 @@ bool MWC713::checkWalletInitialized() {
72
72
Q_ASSERT (mwc713process==nullptr );
73
73
mwc713process = initMwc713process ( {}, {" state" }, false );
74
74
75
+ if (mwc713process==nullptr )
76
+ return false ;
77
+
75
78
if (!util::processWaitForFinished ( mwc713process, 3000 , " mwc713" )) {
76
79
mwc713process->terminate ();
77
80
util::processWaitForFinished ( mwc713process, 3000 , " mwc713" );
@@ -113,7 +116,18 @@ QProcess * MWC713::initMwc713process( const QStringList & envVariables, const Q
113
116
params.append ( paramsPlus );
114
117
115
118
walletStartTime = QDateTime::currentMSecsSinceEpoch ();
116
- commandLine = " '" + QFileInfo (mwc713Path).canonicalFilePath () + " '" ;
119
+
120
+ QString filePath = QFileInfo (mwc713Path).canonicalFilePath ();
121
+ if (filePath.isEmpty ()) {
122
+ // file not found. Let's report it clear way
123
+ logger::logInfo (" MWC713" , " error. mwc713 canonical path is empty" );
124
+
125
+ appendNotificationMessage ( notify::MESSAGE_LEVEL::FATAL_ERROR, " mwc713 executable is not found. Expected location at:\n\n " + mwc713Path );
126
+ return nullptr ;
127
+
128
+ }
129
+
130
+ commandLine = " '" + filePath + " '" ;
117
131
for (auto & p : params) {
118
132
if (p==" -r" || p==mwc::PROMPTS_MWC713 )
119
133
continue ; // skipping prompt parameter. It is not needed for troubleshouting
@@ -171,6 +185,8 @@ void MWC713::start(bool loginWithLastKnownPassword) {
171
185
172
186
// Creating process and starting
173
187
mwc713process = initMwc713process ({}, {} );
188
+ if (mwc713process==nullptr )
189
+ return ;
174
190
175
191
inputParser = new tries::Mwc713InputParser ();
176
192
@@ -206,6 +222,8 @@ void MWC713::start2init(QString password) {
206
222
// Creating process and starting
207
223
208
224
mwc713process = initMwc713process ({" MWC_PASSWORD" , password}, {" init" } );
225
+ if (mwc713process==nullptr )
226
+ return ;
209
227
210
228
inputParser = new tries::Mwc713InputParser ();
211
229
@@ -246,6 +264,8 @@ void MWC713::start2recover(const QVector<QString> & seed, QString password) {
246
264
// Creating process and starting
247
265
// Mnemonic will moved into variables
248
266
mwc713process = initMwc713process ({" MWC_PASSWORD" , password, " MWC_MNEMONIC" , seedStr}, {" recover" , " --mnemonic" , " env" } );
267
+ if (mwc713process==nullptr )
268
+ return ;
249
269
250
270
inputParser = new tries::Mwc713InputParser ();
251
271
0 commit comments