SDK/BaseWidget: Fix possible crash when disabling background
This commit is contained in:
parent
29718db085
commit
6e7fd326db
|
|
@ -266,6 +266,7 @@ Nazara Development Kit:
|
||||||
- Fixed a subtle bug regarding entities invalidation and kill (ex: if an entity #2 kills entity #1 during Entity::Destroy callbacks, entity #1 will survive destruction).
|
- Fixed a subtle bug regarding entities invalidation and kill (ex: if an entity #2 kills entity #1 during Entity::Destroy callbacks, entity #1 will survive destruction).
|
||||||
- Added PhysicsSystem2D::[RaycastQuery, RegionQuery] overloads taking a callback
|
- Added PhysicsSystem2D::[RaycastQuery, RegionQuery] overloads taking a callback
|
||||||
- Added TextAreaWidget support for outline
|
- Added TextAreaWidget support for outline
|
||||||
|
- Fixed possible crash when disabling BaseWidget background
|
||||||
|
|
||||||
# 0.4:
|
# 0.4:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ namespace Ndk
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
DestroyEntity(m_backgroundEntity);
|
||||||
m_backgroundEntity.Reset();
|
m_backgroundEntity.Reset();
|
||||||
m_backgroundSprite.Reset();
|
m_backgroundSprite.Reset();
|
||||||
}
|
}
|
||||||
|
|
@ -185,7 +186,7 @@ namespace Ndk
|
||||||
|
|
||||||
void BaseWidget::Layout()
|
void BaseWidget::Layout()
|
||||||
{
|
{
|
||||||
if (m_backgroundEntity)
|
if (m_backgroundSprite)
|
||||||
m_backgroundSprite->SetSize(m_size.x, m_size.y);
|
m_backgroundSprite->SetSize(m_size.x, m_size.y);
|
||||||
|
|
||||||
UpdatePositionAndSize();
|
UpdatePositionAndSize();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue