diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 14:28:35 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-11 14:28:35 +0000 |
commit | 2d7badb6047d9897c4b7e288b6c6b569b5b643e4 (patch) | |
tree | 4386086d710abcbc50b99a436067c73fa441d969 /indra/newview/llfloatergesture.cpp | |
parent | dd360d05dcae2d11343b585a9d6e6a564aa2bca7 (diff) |
CID-148
Checker: NULL_RETURNS
Function: LLFloaterGesture::onClickPlay()
File: /indra/newview/llfloatergesture.cpp
Diffstat (limited to 'indra/newview/llfloatergesture.cpp')
-rw-r--r-- | indra/newview/llfloatergesture.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index af6386b8b6..90617a337a 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -427,8 +427,13 @@ void LLFloaterGesture::onClickPlay() BOOL inform_server = TRUE; BOOL deactivate_similar = FALSE; LLGestureManager::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id)); - LLGestureManager::instance().activateGestureWithAsset(item_id, gInventory.getItem(item_id)->getAssetUUID(), inform_server, deactivate_similar); - LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; + LLViewerInventoryItem *item = gInventory.getItem(item_id); + llassert(item); + if (item) + { + LLGestureManager::instance().activateGestureWithAsset(item_id, item->getAssetUUID(), inform_server, deactivate_similar); + LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; + } } else { |