diff options
| author | Jason Rumney | 2000-12-01 20:11:23 +0000 |
|---|---|---|
| committer | Jason Rumney | 2000-12-01 20:11:23 +0000 |
| commit | 86d1db205f3e806316d87640dac728b1a683719c (patch) | |
| tree | 4c0b516a4de7fd0252ae329dcf294b0342471acb /src | |
| parent | e4a5241280d674124e9dc9cc23d37c1472331641 (diff) | |
| download | emacs-86d1db205f3e806316d87640dac728b1a683719c.tar.gz emacs-86d1db205f3e806316d87640dac728b1a683719c.zip | |
(get_frame_dc): Avoid changing the palette on an invalid frame.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 8 | ||||
| -rw-r--r-- | src/w32xfns.c | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8eec437130a..b8a419b2acb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-12-01 Jason Rumney <jasonr@gnu.org> | ||
| 2 | |||
| 3 | * w32term.c (w32_clear_window): Avoid clearing an invalid frame. | ||
| 4 | |||
| 5 | * w32xfns.c (get_frame_dc): Avoid changing the palette on an | ||
| 6 | invalid frame. | ||
| 7 | |||
| 1 | 2000-12-01 Gerd Moellmann <gerd@gnu.org> | 8 | 2000-12-01 Gerd Moellmann <gerd@gnu.org> |
| 2 | 9 | ||
| 3 | * window.c (struct saved_window): Add members orig_top and | 10 | * window.c (struct saved_window): Add members orig_top and |
| @@ -9,6 +16,7 @@ | |||
| 9 | 2000-12-01 Jason Rumney <jasonr@gnu.org> | 16 | 2000-12-01 Jason Rumney <jasonr@gnu.org> |
| 10 | 17 | ||
| 11 | * w32term.c (x_draw_vertical_border): Fix call to w32_fill_rect. | 18 | * w32term.c (x_draw_vertical_border): Fix call to w32_fill_rect. |
| 19 | |||
| 12 | * w32fns.c (x_set_cursor_color): Fix last change. | 20 | * w32fns.c (x_set_cursor_color): Fix last change. |
| 13 | 21 | ||
| 14 | 2000-11-30 Gerd Moellmann <gerd@gnu.org> | 22 | 2000-11-30 Gerd Moellmann <gerd@gnu.org> |
diff --git a/src/w32xfns.c b/src/w32xfns.c index 9624e0dd4eb..018aefdf35e 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -117,7 +117,11 @@ get_frame_dc (FRAME_PTR f) | |||
| 117 | enter_crit (); | 117 | enter_crit (); |
| 118 | 118 | ||
| 119 | hdc = GetDC (f->output_data.w32->window_desc); | 119 | hdc = GetDC (f->output_data.w32->window_desc); |
| 120 | select_palette (f, hdc); | 120 | |
| 121 | /* If this gets called during startup before the frame is valid, | ||
| 122 | there is a chance of corrupting random data or crashing. */ | ||
| 123 | if (hdc) | ||
| 124 | select_palette (f, hdc); | ||
| 121 | 125 | ||
| 122 | return hdc; | 126 | return hdc; |
| 123 | } | 127 | } |