mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
Most remaining level editor work
This commit is contained in:
@@ -72,6 +72,7 @@ namespace PortabilityLayer
|
||||
virtual void SetHighlightStyle(int16_t style);
|
||||
|
||||
virtual bool HandlesTickEvents() const;
|
||||
virtual Rect GetExpandedRect() const;
|
||||
|
||||
const Rect &GetRect() const;
|
||||
Window *GetWindow() const;
|
||||
@@ -118,7 +119,7 @@ namespace PortabilityLayer
|
||||
|
||||
void Destroy() override
|
||||
{
|
||||
static_cast<T*>(this)->~T();
|
||||
this->~WidgetSpec();
|
||||
Widget::BaseRelease(static_cast<T*>(this));
|
||||
}
|
||||
|
||||
@@ -141,7 +142,7 @@ namespace PortabilityLayer
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!static_cast<Window*>(state.m_window)->AddWidget(widget))
|
||||
if (state.m_window != nullptr && !static_cast<Window*>(state.m_window)->AddWidget(widget))
|
||||
{
|
||||
widget->Destroy();
|
||||
return nullptr;
|
||||
|
Reference in New Issue
Block a user