Commit 3c0e2b82 authored by cutealien's avatar cutealien

Fix compiling on linux/gcc.

Fix crash in cursors when null-device was used.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3363 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4493f9de
......@@ -65,7 +65,7 @@ namespace scene
//! Linear Cycling Animation ( Sawtooth )
EAMT_LOOPING,
//! Linear bobbing ( Triangle )
EAMT_PINGPONG,
EAMT_PINGPONG
};
//! Names for Animation Type
......
......@@ -2126,7 +2126,7 @@ void CIrrDeviceLinux::CCursorControl::initCursors()
void CIrrDeviceLinux::CCursorControl::update()
{
if ( !Cursors[ActiveIcon].Frames.empty() && Cursors[ActiveIcon].FrameTime )
if ( (u32)ActiveIcon < Cursors.size() && !Cursors[ActiveIcon].Frames.empty() && Cursors[ActiveIcon].FrameTime )
{
// update animated cursors. This could also be done by X11 in case someone wants to figure that out (this way was just easier to implement)
u32 now = Device->getTimer()->getRealTime();
......
......@@ -14,7 +14,7 @@ all: all_linux
# target specific settings
all_linux: SYSTEM=Linux
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../lib/$(SYSTEM) -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lXcursor
all_win32 clean_win32: SYSTEM=Win32-gcc
all_win32: LDFLAGS = -L../lib/$(SYSTEM) -lIrrlicht -lopengl32 -lm
......
Tests finished. 6 tests of 6 passed.
Compiled as DEBUG
Test suite pass at GMT Fri Jul 16 20:23:21 2010
Tests finished. 1 test of 1 passed.
Compiled as DEBUG
Test suite pass at GMT Sun Jul 18 12:05:54 2010
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