aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tx.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tx.go b/tx.go
index 45f8006..d4f343a 100644
--- a/tx.go
+++ b/tx.go
@@ -69,6 +69,9 @@ func (tx *Tx) Get(v *Var) interface{} {
// Set sets the value of a Var for the lifetime of the transaction.
func (tx *Tx) Set(v *Var, val interface{}) {
+ if v == nil {
+ panic("nil Var")
+ }
tx.writes[v] = val
}