diff --git a/docs/reference/changelog-r2025.md b/docs/reference/changelog-r2025.md index 5f0013bb417..888d5d5492d 100644 --- a/docs/reference/changelog-r2025.md +++ b/docs/reference/changelog-r2025.md @@ -48,5 +48,6 @@ Released on December **th, 2023. - Fixed a bug where Webots would crash if a geometry was inserted into a `Shape` node used a bounding box ([#6691](https://github.com/cyberbotics/webots/pull/6691)). - Removed the old `wb_supervisor_field_import_sf_node` and `wb_supervisor_field_import_mf_node` functions from the list of editor autocomplete suggestions ([#6701](https://github.com/cyberbotics/webots/pull/6701)). - Fixed a bug preventing nodes from being inserted into unconnected proto fields ([#6735](https://github.com/cyberbotics/webots/pull/6735)). + - Fixed crash when an invalid HDR image was set as a world background ([#6744](https://github.com/cyberbotics/webots/pull/6744)). - Fixed handling of remote assets from unofficial sources ([#6585](https://github.com/cyberbotics/webots/pull/6585)). - Fixed the QtToolTip bug, where the text in the text box is not being displayed ([#6711](https://github.com/cyberbotics/webots/pull/6711)). diff --git a/projects/robots/clearpath/heron/worlds/ocean.wbt b/projects/robots/clearpath/heron/worlds/ocean.wbt index ff82a803aa0..085e63fd380 100644 --- a/projects/robots/clearpath/heron/worlds/ocean.wbt +++ b/projects/robots/clearpath/heron/worlds/ocean.wbt @@ -3,7 +3,7 @@ EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackground.proto" EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackgroundLight.proto" EXTERNPROTO "webots://projects/objects/obstacles/protos/OilBarrel.proto" -EXTERNPROTO "../protos/Heron.proto" +EXTERNPROTO "webots://projects/robots/clearpath/heron/protos/Heron.proto" WorldInfo { } @@ -30,11 +30,7 @@ DEF WATER Fluid { } ] viscosity 0.01 - boundingObject Transform { - children [ - USE WATER_BOX - ] - } + boundingObject USE WATER_BOX locked TRUE } Heron { diff --git a/projects/robots/clearpath/heron/worlds/swarm.wbt b/projects/robots/clearpath/heron/worlds/swarm.wbt index 98d152608df..1b287526259 100644 --- a/projects/robots/clearpath/heron/worlds/swarm.wbt +++ b/projects/robots/clearpath/heron/worlds/swarm.wbt @@ -3,7 +3,7 @@ EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackground.proto" EXTERNPROTO "webots://projects/objects/backgrounds/protos/TexturedBackgroundLight.proto" EXTERNPROTO "webots://projects/objects/obstacles/protos/OilBarrel.proto" -EXTERNPROTO "../protos/Heron.proto" +EXTERNPROTO "webots://projects/robots/clearpath/heron/protos/Heron.proto" WorldInfo { } @@ -30,11 +30,7 @@ DEF WATER Fluid { } ] viscosity 0.01 - boundingObject Transform { - children [ - USE WATER_BOX - ] - } + boundingObject USE WATER_BOX locked TRUE } OilBarrel { diff --git a/src/webots/nodes/WbBackground.cpp b/src/webots/nodes/WbBackground.cpp index a1faadf6c34..6b445a25665 100644 --- a/src/webots/nodes/WbBackground.cpp +++ b/src/webots/nodes/WbBackground.cpp @@ -540,6 +540,11 @@ bool WbBackground::loadIrradianceTexture(int i) { float *data = stbi_loadf_from_memory(reinterpret_cast(content.constData()), content.size(), &mIrradianceWidth, &mIrradianceHeight, &components, 0); + if (data == NULL) { + warn(tr("Failed to load HDR texture '%1': %2.").arg(url).arg(stbi_failure_reason())); + return false; + } + const int rotate = gCoordinateSystemRotate(i); // FIXME: this texture rotation should be performed by OpenGL or in the shader to get a better performance if (rotate != 0) {