Skip to content

Commit

Permalink
Merge pull request #3109 from HebaruSan/fix/curl-optional
Browse files Browse the repository at this point in the history
Ignore missing DLL for libcurl
  • Loading branch information
techman83 authored Jul 10, 2020
2 parents c90a20d + 4efbed4 commit ba54c79
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Core/Net/Curl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ public static void Init()
Log.Info("Curl init already performed, not running twice");
return;
}
CurlSharp.Curl.GlobalInit(CurlInitFlag.All);
_initComplete = true;
try
{
CurlSharp.Curl.GlobalInit(CurlInitFlag.All);
_initComplete = true;
}
catch (DllNotFoundException)
{
Log.Info("Curl initialization failed. Maybe you should install the DLL?\r\n\r\nhttps://github.com/KSP-CKAN/CKAN/wiki/libcurl");
}
}

/// <summary>
Expand Down

0 comments on commit ba54c79

Please sign in to comment.