Skip to content

Commit

Permalink
fix(⏺️): fix memory error with rounded rectangles (#2812)
Browse files Browse the repository at this point in the history
This fixes an issue with the rrect constructor if the rectangle is not an host object.
  • Loading branch information
wcandillon authored Dec 16, 2024
1 parent bd526a5 commit b72c441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/skia/cpp/api/JsiSkRRect.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class JsiSkRRect : public JsiSkWrappingSharedPtrHostObject<SkRRect> {
createCtor(std::shared_ptr<RNSkPlatformContext> context) {
return JSI_HOST_FUNCTION_LAMBDA {
// Set up the rect
auto rect = JsiSkRect::fromValue(runtime, arguments[0]).get();
auto rect = JsiSkRect::fromValue(runtime, arguments[0]);
auto rx = arguments[1].asNumber();
auto ry = arguments[2].asNumber();
auto rrect = SkRRect::MakeRectXY(*rect, rx, ry);
Expand Down

0 comments on commit b72c441

Please sign in to comment.