Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ bool CLuaVectorGraphicDefs::SetSize(CClientVectorGraphic* vectorGraphic, CVector
int intSizeX = static_cast<int>(size.fX);
int intSizeY = static_cast<int>(size.fY);

vectorGraphicItem->Resize(CVector2D(intSizeX, intSizeY));
vectorGraphicItem->Resize(CVector2D(static_cast<float>(intSizeX), static_cast<float>(intSizeY)));

vectorGraphic->GetDisplay()->Update();
return true;
Expand Down Expand Up @@ -156,7 +156,7 @@ CClientVectorGraphic* CLuaVectorGraphicDefs::SVGCreate(lua_State* luaVM, CVector

if (!didLoad)
{
delete vectorGraphic;
g_pClientGame->GetManager()->GetRenderElementManager()->Remove(vectorGraphic);
return nullptr;
}
}
Expand All @@ -182,13 +182,13 @@ CClientVectorGraphic* CLuaVectorGraphicDefs::SVGCreate(lua_State* luaVM, CVector

if (!didLoad)
{
delete vectorGraphic;
g_pClientGame->GetManager()->GetRenderElementManager()->Remove(vectorGraphic);
return nullptr;
}
}
else
{
delete vectorGraphic;
g_pClientGame->GetManager()->GetRenderElementManager()->Remove(vectorGraphic);

m_pScriptDebugging->LogCustom(luaVM, SString("Unable to load SVG (invalid file path) [%s]", pathOrRawData.value().c_str()));
return nullptr;
Expand Down