Explorar o código

UI: Initialize curl before starting the program

It's best to do the global curl initialization separately before any
curl functions are called.  Prevents initialization threading issues.
jp9000 %!s(int64=10) %!d(string=hai) anos
pai
achega
23e60561cb
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      obs/obs-app.cpp

+ 3 - 0
obs/obs-app.cpp

@@ -40,6 +40,8 @@
 
 #include <fstream>
 
+#include <curl/curl.h>
+
 #ifdef _WIN32
 #include <windows.h>
 #else
@@ -1244,6 +1246,7 @@ int main(int argc, char *argv[])
 
 	fstream logFile;
 
+	curl_global_init(CURL_GLOBAL_ALL);
 	int ret = run_program(logFile, argc, argv);
 
 	blog(LOG_INFO, "Number of memory leaks: %ld", bnum_allocs());