diff options
Diffstat (limited to 'src/game-server/commandhandler.cpp')
-rw-r--r-- | src/game-server/commandhandler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game-server/commandhandler.cpp b/src/game-server/commandhandler.cpp index ca08a636..79758bcf 100644 --- a/src/game-server/commandhandler.cpp +++ b/src/game-server/commandhandler.cpp @@ -1126,6 +1126,12 @@ static void handleAttribute(Entity *player, std::string &args) auto *attribute = attributeManager->getAttributeInfo(attributeId); + if (!attribute) + { + say("Invalid attribute", player); + return; + } + // change the player's attribute beingComponent->setAttribute(*other, attribute, value); |