Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix segmentation fault with tool capabilities (#5899)
- Loading branch information
Showing
with
1 addition
and
1 deletion.
-
+1
−1
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); |
|
|