Commit dac8e20f authored by Alexey Hohlov's avatar Alexey Hohlov
Browse files

Удаление спрайта в деструкторе только если он был создан где-то ранее.

parent fffa9641
......@@ -7,6 +7,7 @@ IObject2D::IObject2D()
_angle = 0;
_alpha = 1;
_size = {64, 64};
sprite = NULL;
}
float IObject2D::alpha()
......@@ -56,5 +57,6 @@ void IObject2D::size(CBox s)
IObject2D::~IObject2D()
{
delete sprite;
if (sprite)
delete sprite;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment