summaryrefslogtreecommitdiff
path: root/src/render.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render.cpp')
-rw-r--r--src/render.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/render.cpp b/src/render.cpp
index ce9b837..ee2e5b2 100644
--- a/src/render.cpp
+++ b/src/render.cpp
@@ -8,6 +8,7 @@ static void draw_tile(sf::RenderWindow *window, float x, float y,
{
sf::Color color;
+ wot_rect.setTexture(NULL);
wot_rect.setSize(sf::Vector2f(1.0f, 1.0f));
wot_rect.setPosition(sf::Vector2f(x, y));
@@ -109,6 +110,9 @@ void state_t::render(game::state_t *game)
void state_t::render(animated_texture_t *anim, sf::FloatRect bounds, bool mirror){
size_t frame;
+ if (!anim)
+ return;
+
if (!anim->frame_count)
return;