Fixed initialization, no need init logs and network if configuration not ready.

This commit is contained in:
XMRig 2017-08-04 21:47:43 +03:00
parent 92d787c817
commit 1720d3e096
3 changed files with 12 additions and 5 deletions

View file

@ -181,11 +181,14 @@ static char *defaultConfigName()
Options *Options::parse(int argc, char **argv)
{
if (!m_self) {
m_self = new Options(argc, argv);
Options *options = new Options(argc, argv);
if (options->isReady()) {
m_self = options;
return m_self;
}
return m_self;
delete options;
return nullptr;
}