diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-14 13:42:45 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-14 13:42:45 +0100 |
commit | ae5f75ab0515f8ee63813ec9284fbfb2124f0a5d (patch) | |
tree | 4959aad7073da7370c92c9838e46bfbbb827523e | |
parent | 0a778c5ecba6a5a2149d1c0956725021f54d917f (diff) |
Allow a common op. on a disposed toolbox.
Change-Id: I4da1f4daaf94456bc951b1d7a96cb28cb7fba0e9
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 3b1ad8f613a3..8394aae58863 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -937,6 +937,9 @@ sal_uInt16 ToolBox::GetItemId( const Point& rPos ) const sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const { + if (!mpData) + return TOOLBOX_ITEM_NOTFOUND; + for (std::vector<ImplToolItem>::const_iterator it = mpData->m_aItems.begin(); it != mpData->m_aItems.end(); ++it) { if (it->maCommandStr == rCommand) |