Skip to content

Commit

Permalink
DrawDebug: Fix a crash with linked objects without an entity
Browse files Browse the repository at this point in the history
Fixes: issue #1608
  • Loading branch information
dscharrer committed Apr 2, 2022
1 parent 77c9aed commit bde1b96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -76,6 +76,7 @@ Other Fixes:
* Fixed a crash caused by the flying eye spell (bug #511)
* Fixed a crash when combining the coin purse with lights
* Fixed a crash with the `activatephysics` script command (bug #1259)
* Fixed a crash with the entity debug view (bug #1608)
* Fixed a hang on startup on some POSIX platforms
* Fixed formatting for HTTPS links in dialogs
* Windows: Fixed a crash with Intel graphics and Crispt Alpha Cutout AA enabled (bug #1568)
Expand Down
2 changes: 1 addition & 1 deletion src/graphics/DrawDebug.cpp
Expand Up @@ -536,7 +536,7 @@ static void drawDebugEntities(bool drawSkeletons) {
for(size_t j = 0; j < entity.obj->linked.size(); j++) {
Vec3f pos = actionPointPosition(entity.obj, entity.obj->linked[j].lidx);
Entity * other = entity.obj->linked[j].io;
drawTextAt(hFontDebug, pos, other->idString(), Color::cyan);
drawTextAt(hFontDebug, pos, other ? std::string_view(other->idString()) : "(obj)", Color::cyan);
}
}

Expand Down

0 comments on commit bde1b96

Please sign in to comment.