From 74d18ec67e920e7a15e9a1ec8abbe4c1374cbdd8 Mon Sep 17 00:00:00 2001 From: cutealien Date: Wed, 5 Sep 2012 19:17:57 +0000 Subject: [PATCH] Fix crash with null-driver in combination with IrrDeviceLinux caused by my last check-in. Thx @ all reporting that. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4307 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CIrrDeviceLinux.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 58227f80..ac93deb8 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -2160,7 +2160,8 @@ CIrrDeviceLinux::CCursorControl::~CCursorControl() #ifdef _IRR_COMPILE_WITH_X11_ void CIrrDeviceLinux::CCursorControl::clearCursors() { - XFreeCursor(Device->display, invisCursor); + if (!Null) + XFreeCursor(Device->display, invisCursor); for ( u32 i=0; i < Cursors.size(); ++i ) { for ( u32 f=0; f < Cursors[i].Frames.size(); ++f )