mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-09 05:01:02 -08:00
(select_palette): Avoid calling SelectPalette if
palette is NULL, since this corrupts memory! Also get display_info reference from frame.
This commit is contained in:
parent
834d23b2c4
commit
90f4a9f8e2
1 changed files with 9 additions and 1 deletions
|
|
@ -84,9 +84,17 @@ signal_quit ()
|
|||
void
|
||||
select_palette (FRAME_PTR f, HDC hdc)
|
||||
{
|
||||
struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f);
|
||||
|
||||
if (!display_info->has_palette)
|
||||
return;
|
||||
|
||||
if (display_info->palette == 0)
|
||||
abort ();
|
||||
|
||||
if (!NILP (Vw32_enable_palette))
|
||||
f->output_data.w32->old_palette =
|
||||
SelectPalette (hdc, one_w32_display_info.palette, FALSE);
|
||||
SelectPalette (hdc, display_info->palette, FALSE);
|
||||
else
|
||||
f->output_data.w32->old_palette = NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue