mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-09-20 22:42:06 +00:00
Fix possible crash
This commit is contained in:
parent
7d0d370330
commit
b1ff0a34db
1 changed files with 10 additions and 1 deletions
|
@ -1754,7 +1754,16 @@ namespace ArchiSteamFarm {
|
|||
|
||||
StringBuilder response = new StringBuilder();
|
||||
foreach (uint gameID in gameIDs) {
|
||||
SteamApps.FreeLicenseCallback callback = await SteamApps.RequestFreeLicense(gameID);
|
||||
SteamApps.FreeLicenseCallback callback;
|
||||
|
||||
try {
|
||||
callback = await SteamApps.RequestFreeLicense(gameID);
|
||||
} catch (Exception e) {
|
||||
ArchiLogger.LogGenericException(e);
|
||||
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponse, BotName, gameID, EResult.Timeout));
|
||||
break;
|
||||
}
|
||||
|
||||
if (callback == null) {
|
||||
response.Append(Environment.NewLine + string.Format(Strings.BotAddLicenseResponse, BotName, gameID, EResult.Timeout));
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue