From 06de03a8539316cf27c8ed437f2cc9aa9973dd68 Mon Sep 17 00:00:00 2001 From: nicehashdev Date: Mon, 7 Mar 2016 19:36:16 +0100 Subject: [PATCH] Bug fixes - crash bug fix --- src/NiceHashBot/Properties/AssemblyInfo.cs | 4 ++-- src/NiceHashBotLib/APIWrapper.cs | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/NiceHashBot/Properties/AssemblyInfo.cs b/src/NiceHashBot/Properties/AssemblyInfo.cs index 673c693..9a18f59 100644 --- a/src/NiceHashBot/Properties/AssemblyInfo.cs +++ b/src/NiceHashBot/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.3.0")] -[assembly: AssemblyFileVersion("1.0.3.0")] +[assembly: AssemblyVersion("1.0.3.2")] +[assembly: AssemblyFileVersion("1.0.3.2")] diff --git a/src/NiceHashBotLib/APIWrapper.cs b/src/NiceHashBotLib/APIWrapper.cs index c15c486..52ac9bf 100644 --- a/src/NiceHashBotLib/APIWrapper.cs +++ b/src/NiceHashBotLib/APIWrapper.cs @@ -212,13 +212,15 @@ 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) + if (MyOrders != null && CachedOList[ServiceLocation, Algorithm].OrderList != null) { - foreach (Order O2 in CachedOList[ServiceLocation, Algorithm].OrderList) + foreach (Order O1 in MyOrders) { - if (O2.ID == O1.ID) - O2.BTCAvailable = O1.BTCAvailable; + foreach (Order O2 in CachedOList[ServiceLocation, Algorithm].OrderList) + { + if (O2.ID == O1.ID) + O2.BTCAvailable = O1.BTCAvailable; + } } }