aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlson2k <k2k@narod.ru>2013-08-02 03:08:46 +0400
committerKarlson2k <k2k@narod.ru>2013-08-04 02:18:37 +0400
commit96277576530f51cf23dafbb577870d7d4ae47c8a (patch)
tree5acb04a2e85204a9e9b758063aac41056d901d32
parent090dd1f4b5f55353fbcadfb6afb95d7a60ba2a17 (diff)
GUIFontTTFDX: prevent crash on unallocated texture or unavailable Direct3D device
-rw-r--r--xbmc/guilib/GUIFontTTFDX.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/xbmc/guilib/GUIFontTTFDX.cpp b/xbmc/guilib/GUIFontTTFDX.cpp
index 92c8465b6c..d6f507db2d 100644
--- a/xbmc/guilib/GUIFontTTFDX.cpp
+++ b/xbmc/guilib/GUIFontTTFDX.cpp
@@ -55,7 +55,10 @@ void CGUIFontTTFDX::Begin()
{
LPDIRECT3DDEVICE9 pD3DDevice = g_Windowing.Get3DDevice();
- if (m_nestedBeginCount == 0)
+ if (pD3DDevice == NULL)
+ CLog::Log(LOGERROR, __FUNCTION__" - failed to get Direct3D device");
+
+ if (m_nestedBeginCount == 0 && pD3DDevice != NULL && m_texture != NULL)
{
int unit = 0;
// just have to blit from our texture.