diff options
| author | Po Lu | 2022-04-07 14:32:10 +0800 |
|---|---|---|
| committer | Po Lu | 2022-04-07 14:32:10 +0800 |
| commit | 510eb1d401b5708657819913a52a3d8ba2dc0f3f (patch) | |
| tree | c8e68cd64613e9a8a92ce583ca87d22c778c57bf /src | |
| parent | 57ad2f333c754c927b7cddc17a61bd73fe38a738 (diff) | |
| download | emacs-510eb1d401b5708657819913a52a3d8ba2dc0f3f.tar.gz emacs-510eb1d401b5708657819913a52a3d8ba2dc0f3f.zip | |
Fix error when calling DND movement tracking function
* src/xterm.c (x_dnd_begin_drag_and_drop): Verify
x_dnd_movement_x and x_dnd_movement_y are wholenums before
caling posn-at-x-y.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index f5770ad7e7c..57a64cb5d12 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9540,7 +9540,12 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, | |||
| 9540 | x_dnd_movement_frame = NULL; | 9540 | x_dnd_movement_frame = NULL; |
| 9541 | 9541 | ||
| 9542 | if (!NILP (Vx_dnd_movement_function) | 9542 | if (!NILP (Vx_dnd_movement_function) |
| 9543 | && !FRAME_TOOLTIP_P (XFRAME (frame_object))) | 9543 | && !FRAME_TOOLTIP_P (XFRAME (frame_object)) |
| 9544 | && x_dnd_movement_x >= 0 | ||
| 9545 | && x_dnd_movement_y >= 0 | ||
| 9546 | && x_dnd_frame | ||
| 9547 | && (XFRAME (frame_object) != x_dnd_frame | ||
| 9548 | || x_dnd_allow_current_frame)) | ||
| 9544 | { | 9549 | { |
| 9545 | x_dnd_old_window_attrs = root_window_attrs; | 9550 | x_dnd_old_window_attrs = root_window_attrs; |
| 9546 | x_dnd_unwind_flag = true; | 9551 | x_dnd_unwind_flag = true; |