From 69944ecb9ec4e0979c12c54366f15ab448a1cf07 Mon Sep 17 00:00:00 2001 From: kenshirothefist Date: Mon, 29 Feb 2016 23:15:01 +0100 Subject: [PATCH] fix for crash when API not accessible --- src/NiceHashBotLib/APIWrapper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NiceHashBotLib/APIWrapper.cs b/src/NiceHashBotLib/APIWrapper.cs index 74ad00f..c15c486 100644 --- a/src/NiceHashBotLib/APIWrapper.cs +++ b/src/NiceHashBotLib/APIWrapper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; using System.Net; @@ -212,6 +212,7 @@ public static List GetAllOrders(int ServiceLocation, int Algorithm, bool List MyOrders = GetMyOrders(ServiceLocation, Algorithm); // Fill missing data + if (MyOrders!=null) foreach (Order O1 in MyOrders) { foreach (Order O2 in CachedOList[ServiceLocation, Algorithm].OrderList)