Skip to content

Commit 7786521

Browse files
ShadowNinjanerzhul
authored andcommittedJun 3, 2017
Fix segmentation fault with tool capabilities (#5899)
1 parent dd0a058 commit 7786521

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎src/game.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3597,7 +3597,7 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
35973597
} else if (pointed.type == POINTEDTHING_NODE) {
35983598
ToolCapabilities playeritem_toolcap =
35993599
playeritem.getToolCapabilities(itemdef_manager);
3600-
if (playeritem.name.empty()) {
3600+
if (playeritem.name.empty() && hand_def.tool_capabilities != NULL) {
36013601
playeritem_toolcap = *hand_def.tool_capabilities;
36023602
}
36033603
handlePointingAtNode(pointed, playeritem_def, playeritem_toolcap, dtime);

0 commit comments

Comments
 (0)