From cba783f7faf517cb747177b2854567de5604c65d Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Sat, 3 Jun 2017 17:59:17 -0400 Subject: Fix segmentation fault with tool capabilities (#5899) --- src/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index ff473e022..75d1f7cc8 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -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); -- cgit v1.2.3