Skip to content
Snippets Groups Projects
  • Simon Tatham's avatar
    329bdb34
    Make TermWin's palette_get_overrides() take a Terminal *. · 329bdb34
    Simon Tatham authored
    Less than 12 hours after 0.75 went out of the door, a user pointed out
    that enabling the 'Use system colours' config option causes an
    immediate NULL-dereference crash. The reason is because a chain of
    calls from term_init() ends up calling back to the Windows
    implementation of the palette_get_overrides() method, which responds
    by trying to call functions on the static variable 'term' in window.c,
    which won't be initialised until term_init() has returned.
    
    Simple fix: palette_get_overrides() is now given a pointer to the
    Terminal that it should be updating, because it can't find it out any
    other way.
    
    (cherry picked from commit 571fa338)
    329bdb34
    History
    Make TermWin's palette_get_overrides() take a Terminal *.
    Simon Tatham authored
    Less than 12 hours after 0.75 went out of the door, a user pointed out
    that enabling the 'Use system colours' config option causes an
    immediate NULL-dereference crash. The reason is because a chain of
    calls from term_init() ends up calling back to the Windows
    implementation of the palette_get_overrides() method, which responds
    by trying to call functions on the static variable 'term' in window.c,
    which won't be initialised until term_init() has returned.
    
    Simple fix: palette_get_overrides() is now given a pointer to the
    Terminal that it should be updating, because it can't find it out any
    other way.
    
    (cherry picked from commit 571fa338)