Przeglądaj źródła

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 10 lat temu
rodzic
commit
23e60561cb
1 zmienionych plików z 3 dodań i 0 usunięć
  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());