diff --git a/src/graphics/texture_manager.cpp b/src/graphics/texture_manager.cpp index 5b823cf72..fce9c61f7 100644 --- a/src/graphics/texture_manager.cpp +++ b/src/graphics/texture_manager.cpp @@ -34,8 +34,8 @@ GLuint getTextureGLuint(irr::video::ITexture *tex) { - if (tex == NULL) - return 0; + if (tex == NULL) + return 0; #if defined(USE_GLES2) return static_cast(tex)->getOpenGLTextureName(); #else diff --git a/src/tracks/track_object_presentation.cpp b/src/tracks/track_object_presentation.cpp index 783ba803f..eebfa6ad4 100644 --- a/src/tracks/track_object_presentation.cpp +++ b/src/tracks/track_object_presentation.cpp @@ -405,7 +405,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh( World::getWorld()->getIdent() == IDENT_CUTSCENE); m_model_file = model_file; - + file_manager->pushTextureSearchPath(StringUtils::getPath(model_file)); if (file_manager->fileExists(model_file)) { if (animated) @@ -419,6 +419,7 @@ TrackObjectPresentationMesh::TrackObjectPresentationMesh( throw std::runtime_error("Model '" + model_file + "' cannot be found"); } + file_manager->popTextureSearchPath(); init(NULL, NULL, true); } // TrackObjectPresentationMesh