diff --git a/CHANGELOG b/CHANGELOG index cfc211d310..93c8e1c1b0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/src/graphics/DrawDebug.cpp b/src/graphics/DrawDebug.cpp index 263ddc8300..3449768c0b 100644 --- a/src/graphics/DrawDebug.cpp +++ b/src/graphics/DrawDebug.cpp @@ -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); } }