Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-10-11 04:56:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-10-11 04:56:49 +0400
commit9b948cad08067a6bedd49ccfb059874aba7555b9 (patch)
tree5fc5236ab893aaaadec1a83081b923ededd24e32 /source/gameengine/GameLogic/Joystick
parentc3aef29ab704ba7ca9ec401ad0028d21d8b431be (diff)
Fix for a relative paths issue in the game engine. G.sce was being
kept as the original file, but that can't work correct for solving relative paths once a .blend in another directory is loaded. The reason it went OK with the apricot tech demo is that the images there were lib linked into the level file, which still worked. Now it sets G.sce to the current loaded .blend file. Note that the python config file path still uses the first loaded .blend file so it looks in the same location each time. Also added some NULL pointer checks in the joystick code because it was crashing there on Mac, there's similar checks in related functions so I'm assuming this was just a missed case.
Diffstat (limited to 'source/gameengine/GameLogic/Joystick')
-rw-r--r--source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
index 89e2420f822..73ca288861d 100644
--- a/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
+++ b/source/gameengine/GameLogic/Joystick/SCA_JoystickEvents.cpp
@@ -89,7 +89,8 @@ void SCA_Joystick::HandleEvents(void)
int i;
for (i=0; i<JOYINDEX_MAX; i++) {
- SCA_Joystick::m_instance[i]->OnNothing(&sdl_event);
+ if(SCA_Joystick::m_instance[i])
+ SCA_Joystick::m_instance[i]->OnNothing(&sdl_event);
}
if(SDL_PollEvent(&sdl_event))