Fix crash in znc --version, caused by latest commits.

Fix #838
This commit is contained in:
Alexey Sokolov
2015-02-01 15:36:31 +00:00
parent ff88f24494
commit d4a36aaa93

View File

@@ -199,6 +199,7 @@ int main(int argc, char** argv) {
#ifdef HAVE_LIBSSL
bool bMakePem = false;
#endif
CZNC::CreateInstance();
while ((iArg = getopt_long(argc, argv, "hvnrcspd:Df", g_LongOpts, &iOptIndex)) != -1) {
switch (iArg) {
@@ -252,8 +253,6 @@ int main(int argc, char** argv) {
return 1;
}
CZNC::CreateInstance();
CZNC* pZNC = &CZNC::Get();
pZNC->InitDirs(((argc) ? argv[0] : ""), sDataDir);