summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DDTable.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/DDTable.cs b/DDTable.cs
index 78d58b9..31bbd82 100644
--- a/DDTable.cs
+++ b/DDTable.cs
@@ -62,8 +62,14 @@ namespace BCDD
{
BCalcWrapper.bcalcDDS_setPlayerOnLeadAndReset(solver, BCalcWrapper.bcalc_declarerToLeader(player));
result[player, denom] = 13 - BCalcWrapper.bcalcDDS_getTricksToTake(solver);
+ String error = Marshal.PtrToStringAuto(BCalcWrapper.bcalcDDS_getLastError(solver));
+ if (error != null)
+ {
+ throw new DDTableInvalidException("BCalc error: " + error);
+ }
}
}
+ BCalcWrapper.bcalcDDS_delete(solver);
return this.validateTable(result);
}