From b9bf764de49168e1a797dcd17218c1d168e7559f Mon Sep 17 00:00:00 2001 From: Jianan Date: Tue, 31 Jan 2023 22:00:51 +0800 Subject: [PATCH] [sdl]Fix getting MeshAttachment's texture error. (#2233) --- spine-sdl/src/spine-sdl-cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-sdl/src/spine-sdl-cpp.cpp b/spine-sdl/src/spine-sdl-cpp.cpp index 9cbba55049..1993df664f 100644 --- a/spine-sdl/src/spine-sdl-cpp.cpp +++ b/spine-sdl/src/spine-sdl-cpp.cpp @@ -115,7 +115,7 @@ void SkeletonDrawable::draw(SDL_Renderer *renderer) { worldVertices.setSize(mesh->getWorldVerticesLength(), 0); mesh->computeWorldVertices(slot, 0, mesh->getWorldVerticesLength(), worldVertices.buffer(), 0, 2); - texture = (SDL_Texture *) ((AtlasRegion *) mesh->getRendererObject())->page->getRendererObject(); + texture = (SDL_Texture *) mesh->getRegion()->rendererObject; verticesCount = mesh->getWorldVerticesLength() >> 1; uvs = &mesh->getUVs(); indices = &mesh->getTriangles();