summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg.cc
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 01:41:54 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-24 01:41:54 +0000
commit4bc8fa481841a89bd2b6880f7570824478048ca1 (patch)
treed939a75f96f3ae730f7f79ff226d6028d3045007 /crawl-ref/source/tilereg.cc
parent04fbe88386b9ebe9d655b0270c9453a885b05d1c (diff)
downloadcrawl-ref-4bc8fa481841a89bd2b6880f7570824478048ca1.tar.gz
crawl-ref-4bc8fa481841a89bd2b6880f7570824478048ca1.zip
Moving more settings to the Tiles options file. Fixing a mouse-related crash that Johanna mentioned.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6657 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tilereg.cc')
-rw-r--r--crawl-ref/source/tilereg.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 0fff45c4d7..8338c64f81 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -1487,8 +1487,6 @@ int InventoryRegion::handle_mouse(MouseEvent &event)
if (event.event != MouseEvent::PRESS)
return 0;
- // TODO enne - if mouse_mode is command, then:
-
unsigned int item_idx = cursor_index();
if (item_idx >= m_items.size() || m_items[item_idx].empty())
return 0;
@@ -1589,6 +1587,9 @@ static bool _can_use_item(const item_def &item, bool equipped)
bool InventoryRegion::update_tip_text(std::string& tip)
{
+ if (m_cursor == NO_CURSOR)
+ return false;
+
unsigned int item_idx = cursor_index();
if (item_idx >= m_items.size() || m_items[item_idx].empty())
return false;