This commit is contained in:
Gwenael Treguier 2015-12-15 20:57:32 +01:00
parent 0b42e3c78c
commit 13c93e0f8b

View File

@ -490,7 +490,8 @@ impl InnerConnection {
T: ToResult
{
let boxed_aggr: *mut D = mem::transmute(ffi::sqlite3_user_data(ctx));
assert!(!boxed_aggr.is_null(), "Internal error - null aggregate pointer");
assert!(!boxed_aggr.is_null(),
"Internal error - null aggregate pointer");
// TODO Validate: double indirection: `pac` allocated/freed by SQLite and `ac` allocated/freed by Rust.
let pac = ffi::sqlite3_aggregate_context(ctx, ::std::mem::size_of::<*mut A>() as c_int) as *mut *mut A;
@ -517,7 +518,8 @@ impl InnerConnection {
T: ToResult
{
let boxed_aggr: *mut D = mem::transmute(ffi::sqlite3_user_data(ctx));
assert!(!boxed_aggr.is_null(), "Internal error - null aggregate pointer");
assert!(!boxed_aggr.is_null(),
"Internal error - null aggregate pointer");
let pac = ffi::sqlite3_aggregate_context(ctx, 0) as *mut *mut A;
if pac.is_null() || (*pac).is_null() {