MRI-Binding: Properly init Bitmap in Graphics#snap_to_bitmap

This commit is contained in:
Jonas Kulla 2014-07-16 05:27:16 +02:00
parent b8d861b4cd
commit b878149f5c
2 changed files with 20 additions and 11 deletions

View file

@ -152,6 +152,8 @@ RB_METHOD(graphicsFadein)
return Qnil;
}
void bitmapInitProps(Bitmap *b, VALUE self);
RB_METHOD(graphicsSnapToBitmap)
{
RB_UNUSED_PARAM;
@ -159,7 +161,10 @@ RB_METHOD(graphicsSnapToBitmap)
Bitmap *result = 0;
GUARD_EXC( result = shState->graphics().snapToBitmap(); );
return wrapObject(result, BitmapType);
VALUE obj = wrapObject(result, BitmapType);
bitmapInitProps(result, obj);
return obj;
}
#endif