• A. Tombs's avatar
    Win32: Cleanup pointer test in win32_window.c · 8542f8dd
    A. Tombs authored
    MSVC 2019 complains that the code at line 1744
    (`GetMonitorInfo(window->monitor->win32.handle, &mi);`) can potentially
    dereference a null pointer. The compiler is wrong in this case (it has
    not spotted that `monitor` and `window->monitor` must be equal), but
    I think it makes sense for our non-NULL test to be on the variable we
    actually use rather than the one it was set from.
    
    Related to #1491.
    
    (cherry picked from commit 1d6215726807e73fd21da9a4a09c28aab3111879)
    8542f8dd
win32_window.c 67.4 KB