From: Cheng Zhao Date: Thu, 6 Aug 2015 07:22:17 +0000 (+0800) Subject: Check button size X-Git-Tag: v0.30.3~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=744059b8bd8132d5fd1cfd757accc60b45ba55e2;p=electron.git Check button size --- diff --git a/atom/browser/ui/win/taskbar_host.cc b/atom/browser/ui/win/taskbar_host.cc index c728e466..a8e6ff29 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();