[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Fix gdi leak (PR #658)
Marcel Taeumel
notifications at github.com
Mon Nov 14 14:26:21 UTC 2022
@marceltaeumel commented on this pull request.
> @@ -1793,7 +1794,12 @@ static thisGetDpiForMonitor_t thisGetDpiForMonitor = NULL;
*/
static double getDpiSystem(void)
{
- return (double) GetDeviceCaps(GetWindowDC(stWindow), LOGPIXELSY);
+ double dpi;
+ HDC dc = GetWindowDC(stWindow);
+ if (!dc) return 0.0; /* fail */
Note that `Float nan` is the contract for unknown dpi scale.
--
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/658#pullrequestreview-1179208625
You are receiving this because you are subscribed to this thread.
Message ID: <OpenSmalltalk/opensmalltalk-vm/pull/658/review/1179208625 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20221114/f4921f64/attachment-0001.html>
More information about the Vm-dev
mailing list