Fix free being called on null pointer in Graphics.snap_to_bitmap in standalone builds

This commit is contained in:
刘皓 2025-05-17 18:20:17 -04:00
parent 2f589e1cf4
commit c18e7e28a3
No known key found for this signature in database
GPG key ID: 7901753DB465B711

View file

@ -270,7 +270,7 @@ RB_METHOD_GUARD(graphicsSnapToBitmap)
Bitmap *result = 0;
BINDING_GUARD_LF(delete result, result = shState->graphics().snapToBitmap(e));
BINDING_GUARD_L(result = shState->graphics().snapToBitmap(e));
VALUE obj = wrapObject(result, BitmapType);
bitmapInitProps(result, obj);