Skip to content

Commit

Permalink
Fix segmentation fault with tool capabilities (#5899)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja authored and nerzhul committed Jun 3, 2017
1 parent dd0a058 commit 7786521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game.cpp
Expand Up @@ -3597,7 +3597,7 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
} else if (pointed.type == POINTEDTHING_NODE) {
ToolCapabilities playeritem_toolcap =
playeritem.getToolCapabilities(itemdef_manager);
if (playeritem.name.empty()) {
if (playeritem.name.empty() && hand_def.tool_capabilities != NULL) {
playeritem_toolcap = *hand_def.tool_capabilities;
}
handlePointingAtNode(pointed, playeritem_def, playeritem_toolcap, dtime);
Expand Down

0 comments on commit 7786521

Please sign in to comment.