Fix T55072: Top bar disappears when loading factory settings (causing ASAN crash)

This commit is contained in:
Julian Eisel 2018-05-23 12:06:38 +02:00
parent 5667822876
commit 909d548d56
Notes: blender-bot 2023-02-14 06:00:46 +01:00
Referenced by issue #55072, Crash: Top bar disappears when loading factory settings, lead to crashes, and re-appears on resize
1 changed files with 3 additions and 1 deletions

View File

@ -802,13 +802,15 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
/* exception for bg mode, we only need the screen context */
if (!G.background) {
WM_window_set_dpi(win);
/* Get window pixels __after__ updating window DPI! */
const int window_size_x = WM_window_pixels_x(win);
const int window_size_y = WM_window_pixels_y(win);
const int screen_size_x = WM_window_screen_pixels_x(win);
const int screen_size_y = WM_window_screen_pixels_y(win);
/* header size depends on DPI, let's verify */
WM_window_set_dpi(win);
screen_refresh_headersizes();
screen_vertices_scale(win, screen, window_size_x, window_size_y, screen_size_x, screen_size_y);