If the VESA mode chooses a mode with 8 bit pixels, but the tile set has too many colors for that, a null dereference can result when trying to set up the nonexistent palette. Catch this condition and refuse to set VESA mode instead.
If the VESA mode chooses a mode with 8 bit pixels, but the tile set has too many colors for that, a null dereference can result when trying to set up the nonexistent palette. Catch this condition and refuse to set VESA mode instead.