From c9244568ebfbbc598bdf215ce2d3c03dec070712 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 26 Oct 2016 14:30:17 +0200 Subject: [PATCH] Merge with develop --- .../client/src/interface_v3/action_handler_game.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index 59cd79b11..76e664bc0 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -2481,17 +2481,25 @@ class CAHAddShape : public IActionHandler virtual void execute (CCtrlBase * /* pCaller */, const string &Params) { string sShape = getParam(Params, "shape"); - if(sShape.empty()) + + if (sShape.empty()) { nlwarning("Command 'add_shape': need at least the parameter shape."); return; } + if (!Scene) { nlwarning("No scene available"); return; } + if (!UserEntity) + { + nlwarning("UserEntity not yet defined, possibly called runAH from Lua"); + return; + } + double x = UserEntity->pos().x; double y = UserEntity->pos().y; double z = UserEntity->pos().z;