From 744059b8bd8132d5fd1cfd757accc60b45ba55e2 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 6 Aug 2015 15:22:17 +0800 Subject: [PATCH] Check button size --- atom/browser/ui/win/taskbar_host.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/ui/win/taskbar_host.cc b/atom/browser/ui/win/taskbar_host.cc index c728e4664..a8e6ff292 100644 --- a/atom/browser/ui/win/taskbar_host.cc +++ b/atom/browser/ui/win/taskbar_host.cc @@ -54,7 +54,7 @@ TaskbarHost::~TaskbarHost() { bool TaskbarHost::SetThumbarButtons( HWND window, const std::vector& buttons) { - if (!InitailizeTaskbar()) + if (buttons.size() > kMaxButtonsCount || !InitailizeTaskbar()) return false; callback_map_.clear();