From 9b30effafddef6e1abad5ded1da918c937cd91b7 Mon Sep 17 00:00:00 2001 From: kbuffington Date: Wed, 29 Apr 2009 16:22:02 +0000 Subject: [PATCH] Fixed a potential crash in SCREEN_WIDTH & SCREEN_HEIGHT when not passing a SysInfoData. --- Plugins/PluginSysInfo/SysInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/PluginSysInfo/SysInfo.cpp b/Plugins/PluginSysInfo/SysInfo.cpp index 87d57587..b24b0962 100644 --- a/Plugins/PluginSysInfo/SysInfo.cpp +++ b/Plugins/PluginSysInfo/SysInfo.cpp @@ -445,12 +445,12 @@ double Update2(UINT id) if (data) return m_Monitors.m_MonitorInfo[data-1].rcMonitor.right-m_Monitors.m_MonitorInfo[data-1].rcMonitor.left; else - GetSystemMetrics(SM_CXSCREEN); + return GetSystemMetrics(SM_CXSCREEN); case SCREEN_HEIGHT: if (data) return m_Monitors.m_MonitorInfo[data-1].rcMonitor.bottom-m_Monitors.m_MonitorInfo[data-1].rcMonitor.top; else - GetSystemMetrics(SM_CYSCREEN); + return GetSystemMetrics(SM_CYSCREEN); case VIRTUAL_SCREEN_WIDTH: return GetSystemMetrics(SM_CXVIRTUALSCREEN); case VIRTUAL_SCREEN_HEIGHT: