mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fix crash when exiting after disabling the mouse
Add guards to return if the mouse is enabled or disabled in disable_mouse and enable_mouse, respectively.
This commit is contained in:
parent
f9a452ece7
commit
f040b6f100
@ -75,6 +75,8 @@ disable_mouse(void)
|
||||
{
|
||||
int h = get_output_handle(); /* XXX: Is this all right? -- Miciah */
|
||||
|
||||
if (!mouse_enabled) return;
|
||||
|
||||
unhandle_mouse(ditrm->mouse_h);
|
||||
if (is_xterm()) send_mouse_done_sequence(h);
|
||||
|
||||
@ -86,6 +88,8 @@ enable_mouse(void)
|
||||
{
|
||||
int h = get_output_handle(); /* XXX: Is this all right? -- Miciah */
|
||||
|
||||
if (mouse_enabled) return;
|
||||
|
||||
if (is_xterm()) send_mouse_init_sequence(h);
|
||||
ditrm->mouse_h = handle_mouse(0, (void (*)(void *, unsigned char *, int)) itrm_queue_event, ditrm);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user