https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ce537f1ae945813041cad…
commit ce537f1ae945813041cad50f0853a5a16d11bc20
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Thu May 30 19:21:45 2019 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Fri Jun 4 09:15:55 2021 +0200
[EXPLORER] Check m_Position for -1 before using it as an index
This fixes a crash on x64.
---
base/shell/explorer/traywnd.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/shell/explorer/traywnd.cpp b/base/shell/explorer/traywnd.cpp
index 5473e190bfa..e14e805b8f7 100644
--- a/base/shell/explorer/traywnd.cpp
+++ b/base/shell/explorer/traywnd.cpp
@@ -1373,7 +1373,7 @@ GetPrimaryScreenRect:
m_TrayRects[m_Position] = rcTray;
}
- else
+ else if (m_Position != (DWORD)-1)
{
/* If the user isn't resizing the tray window we need to make sure
the
new size or position is valid. this is to prevent changes to the
window