summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TopToolBar')
-rw-r--r--plugins/TopToolBar/main.cpp4
-rw-r--r--plugins/TopToolBar/toolbar.cpp4
2 files changed, 3 insertions, 5 deletions
diff --git a/plugins/TopToolBar/main.cpp b/plugins/TopToolBar/main.cpp
index d4f486bbe0..91b41be6cc 100644
--- a/plugins/TopToolBar/main.cpp
+++ b/plugins/TopToolBar/main.cpp
@@ -4,8 +4,6 @@
HINSTANCE hInst;
PLUGINLINK *pluginLink;
-MM_INTERFACE mmi;
-LIST_INTERFACE li;
HANDLE hHookTTBModuleLoaded;
int hLangpack;
@@ -46,8 +44,6 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
- mir_getMMI( &mmi );
- mir_getLI( &li );
mir_getLP(&pluginInfo);
LoadToolbarModule();
diff --git a/plugins/TopToolBar/toolbar.cpp b/plugins/TopToolBar/toolbar.cpp
index 17e5028df0..7161d26c9b 100644
--- a/plugins/TopToolBar/toolbar.cpp
+++ b/plugins/TopToolBar/toolbar.cpp
@@ -185,7 +185,9 @@ INT_PTR TTBRemoveButton(WPARAM wParam, LPARAM lParam)
RemoveFromOptions(b->id);
- Buttons.remove(b);
+ int idx = Buttons.getIndex(b);
+ if (idx != -1)
+ Buttons.remove(idx);
delete b;
ArrangeButtons();