From 9ca61449452f437955438000d8d6450773b403cd Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Tue, 28 Mar 2017 09:28:06 +0000 Subject: [PATCH] [EXPLORER] -Try to fix a crash in explorer. CORE-12991 svn path=/trunk/; revision=74237 --- reactos/base/shell/explorer/taskswnd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/reactos/base/shell/explorer/taskswnd.cpp b/reactos/base/shell/explorer/taskswnd.cpp index 3d89bd4240a..28ea46ca491 100644 --- a/reactos/base/shell/explorer/taskswnd.cpp +++ b/reactos/base/shell/explorer/taskswnd.cpp @@ -1162,7 +1162,11 @@ public: tbm.dwMask = TBMF_BUTTONSPACING; m_TaskBar.GetMetrics(&tbm); - uiRows = (rcClient.bottom + tbm.cyButtonSpacing) / (m_ButtonSize.cy + tbm.cyButtonSpacing); + if (m_ButtonSize.cy + tbm.cyButtonSpacing != 0) + uiRows = (rcClient.bottom + tbm.cyButtonSpacing) / (m_ButtonSize.cy + tbm.cyButtonSpacing); + else + uiRows = 1; + if (uiRows == 0) uiRows = 1; -- 2.17.1