mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 12:39:24 -05:00
Don't crash if a tile does not have enough data for the heuristic
This commit is contained in:
@@ -638,7 +638,7 @@ RawTile RawTileDataReader::readTileData(TileIndex tileIndex) const {
|
||||
|
||||
for (const MemoryLocation& ml : NoDataAvailableData) {
|
||||
std::byte* ptr = rawTile.imageData.get();
|
||||
if (ptr[ml.offset] != ml.value) {
|
||||
if (ml.offset >= numBytes || ptr[ml.offset] != ml.value) {
|
||||
// Bail out as early as possible
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user