Quote:
Originally Posted by shekh
&PointFilter() is taking address of a temporary object, which has a const qualifier
I would put this on separate line
PointFilter filter;
return CreateResize( args[0].AsClip(), args[1].AsInt(), args[2].AsInt(),args[7].AsInt(0), &args[3], &filter, env );
but I hope CreateResize does not store that pointer somewhere
|
Nah, you're passing out an address on stack, &filter is a dangling pointer!
The object is meant to be on the stack of CreateResize, not the stack of the function that calls CreateResize!