Skip to content

Commit

Permalink
fix for issue #2 (segn=mentation fault at fatty startup)
Browse files Browse the repository at this point in the history
win_dark_mode function is called before the terminals are created.
win_proc function is then triggered when the active terminal is still NULL.
  • Loading branch information
paolo-sz committed Apr 25, 2020
1 parent d9ccd4d commit 5b87b5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/winmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -5015,9 +5015,6 @@ main(int argc, char *argv[])
null, null, inst, null);
trace_winsize("createwindow");

// Dark mode support
win_dark_mode(wnd);

// Workaround for failing title parameter:
if (pEnableNonClientDpiScaling)
SetWindowTextW(wnd, wtitle);
Expand Down Expand Up @@ -5250,6 +5247,9 @@ main(int argc, char *argv[])
win_tab_set_argv(argv);
}

// Dark mode support
win_dark_mode(wnd);

term_p = win_active_terminal();
TERM_VAR_REF(true)

Expand Down

0 comments on commit 5b87b5f

Please sign in to comment.