From b5afeadb5b5841cf9f5710b963a5d330e3d986a1 Mon Sep 17 00:00:00 2001
From: Jonas Kulla <Nyocurio@gmail.com>
Date: Tue, 1 Oct 2013 02:29:02 +0200
Subject: [PATCH] Fix null deref

---
 src/sprite.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sprite.cpp b/src/sprite.cpp
index 1581333..a60e239 100644
--- a/src/sprite.cpp
+++ b/src/sprite.cpp
@@ -82,6 +82,9 @@ struct SpritePrivate
 
 	void recomputeBushDepth()
 	{
+		if (!bitmap)
+			return;
+
 		/* Calculate effective (normalized) bush depth */
 		float texBushDepth = (bushDepth / trans.getScale().y) -
 		                     (srcRect->y + srcRect->height) +