Bugfix: invalid variable still used after move (#171)
This commit is contained in:
parent
49d33bea55
commit
58ce182983
|
|
@ -280,8 +280,10 @@ namespace Nz
|
|||
else
|
||||
{
|
||||
material->SetDiffuseMap(std::move(texture));
|
||||
if (resizeSprite && texture && texture->IsValid())
|
||||
SetSize(Vector2f(Vector2ui(texture->GetSize())));
|
||||
const TextureRef& newTexture = material->GetDiffuseMap();
|
||||
|
||||
if (resizeSprite && newTexture && newTexture->IsValid())
|
||||
SetSize(Vector2f(Vector2ui(newTexture->GetSize())));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue