Skip to content

Commit 69944ec

Browse files
fix for crash when API not accessible
1 parent aa7d25f commit 69944ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NiceHashBotLib/APIWrapper.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Text;
44
using System.Net;
@@ -212,6 +212,7 @@ public static List<Order> GetAllOrders(int ServiceLocation, int Algorithm, bool
212212
List<Order> MyOrders = GetMyOrders(ServiceLocation, Algorithm);
213213

214214
// Fill missing data
215+
if (MyOrders!=null)
215216
foreach (Order O1 in MyOrders)
216217
{
217218
foreach (Order O2 in CachedOList[ServiceLocation, Algorithm].OrderList)

0 commit comments

Comments
 (0)