Skip to content

Commit

Permalink
Fixed another crash when a coin goes missing from CoinChoose.com
Browse files Browse the repository at this point in the history
  • Loading branch information
nwoolls committed Aug 15, 2013
1 parent e689e21 commit d41ae9b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions MultiMiner.Engine/MiningEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,16 @@ private void logProcessClose(MinerProcess minerProcess)
DateTime startDate = minerProcess.StartDate;
DateTime endDate = DateTime.Now;
string coinName = minerProcess.MinerConfiguration.CoinName;
string coinSymbol = minerProcess.CoinInformation.Symbol;
double priceAtStart = minerProcess.CoinInformation.Price;

double priceAtStart = 0;
string coinSymbol = String.Empty;
//coin may not be in CoinChoose.com
if (minerProcess.CoinInformation != null)
{
coinSymbol = minerProcess.CoinInformation.Symbol;
priceAtStart = minerProcess.CoinInformation.Price;
}

double priceAtEnd = priceAtStart;

//can't use Single here - coin info may be gone now and we crash
Expand Down

0 comments on commit d41ae9b

Please sign in to comment.