Check button size

This commit is contained in:
Cheng Zhao 2015-08-06 15:22:17 +08:00
parent 8864498065
commit 744059b8bd

View file

@ -54,7 +54,7 @@ TaskbarHost::~TaskbarHost() {
bool TaskbarHost::SetThumbarButtons(
HWND window, const std::vector<ThumbarButton>& buttons) {
if (!InitailizeTaskbar())
if (buttons.size() > kMaxButtonsCount || !InitailizeTaskbar())
return false;
callback_map_.clear();