szferi/gomdb — pull request #4 by benbjohnson (2013-05-22 22:55:14+00:00)
Title: txn.Get() uses a NULL return pointer.

The `txn.Get()` call was failing because the cval pointer is NULL. If you turn on `MDB_DEBUG` in the lmdb source then you can see the failed assertion. I just changed the code so that the `cval` is a local variable and its reference is passed to `mdb_get()`. The value gets copied out before the function ends so it shouldn't be a problem that it's local.