diff options
author | Jason Rumney <jasonr@gnu.org> | 2011-07-08 20:46:17 +0800 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2011-07-08 20:46:17 +0800 |
commit | 5df75e47acc4835afa4935c528c16e926b3b7f58 (patch) | |
tree | 037d1a27ae4890ea08a838f2686e6ef76ed3af8a /src | |
parent | 2b7f7d9992e8b38f52e8159a77c3da4eaf743b95 (diff) | |
download | emacs-5df75e47acc4835afa4935c528c16e926b3b7f58.tar.gz |
* src/w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
frame struct members of non-existent frames.
Fixes: debbugs:6284
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/w32fns.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 89f5e0ee64d..c48956042a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-07-08 Jason Rumney <jasonr@gnu.org> + + * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using + frame struct members of non-existent frames (Bug#6284). + 2011-07-08 Jan Djärv <jan.h.d@swipnet.se> * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and diff --git a/src/w32fns.c b/src/w32fns.c index cba0b91e685..f48e5764b4c 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -3273,7 +3273,8 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { /* Free memory used by owner-drawn and help-echo strings. */ w32_free_menu_strings (hwnd); - f->output_data.w32->menubar_active = 0; + if (f) + f->output_data.w32->menubar_active = 0; menubar_in_use = 0; } } @@ -3623,10 +3624,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (LOWORD (lParam) == HTCLIENT) { f = x_window_to_frame (dpyinfo, hwnd); - if (f->output_data.w32->hourglass_p && !menubar_in_use - && !current_popup_menu) + if (f && f->output_data.w32->hourglass_p + && !menubar_in_use && !current_popup_menu) SetCursor (f->output_data.w32->hourglass_cursor); - else + else if (f) SetCursor (f->output_data.w32->current_cursor); return 0; } |