mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-23 14:52:52 -05:00
Fixed initialization, no need init logs and network if configuration not ready.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user