mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix segmentation fault with tool capabilities (#5899)
This commit is contained in:
parent
dd0a058e1f
commit
7786521f15
1 changed files with 1 additions and 1 deletions
|
@ -3597,7 +3597,7 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
|
||||||
} else if (pointed.type == POINTEDTHING_NODE) {
|
} else if (pointed.type == POINTEDTHING_NODE) {
|
||||||
ToolCapabilities playeritem_toolcap =
|
ToolCapabilities playeritem_toolcap =
|
||||||
playeritem.getToolCapabilities(itemdef_manager);
|
playeritem.getToolCapabilities(itemdef_manager);
|
||||||
if (playeritem.name.empty()) {
|
if (playeritem.name.empty() && hand_def.tool_capabilities != NULL) {
|
||||||
playeritem_toolcap = *hand_def.tool_capabilities;
|
playeritem_toolcap = *hand_def.tool_capabilities;
|
||||||
}
|
}
|
||||||
handlePointingAtNode(pointed, playeritem_def, playeritem_toolcap, dtime);
|
handlePointingAtNode(pointed, playeritem_def, playeritem_toolcap, dtime);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue