|
From: <tim...@en...> - 2005-07-15 21:14:49
|
Ethan Merritt wrote:
>On Friday 15 July 2005 03:17 pm, Timoth=C3=A9e Lecomte wrote:
> =20
>
>>While working on my wxwidgets terminal, I've just encountered the=20
>>following problem : typing "set terminal wxt" twice (without any plot=20
>>call between) gives a segmentation fault.
>> =20
>>
>
>That is indeed a problem, but since existing drivers do not segfault
>on two "set term" command I think this is a something you need to
>fix in your driver.
>=20
> =20
>
> (...)
>
>--- mouse.c 2005-07-16 00:01:58.000000000 +0200
>+++ mouse2.c 2005-07-16 00:02:51.000000000 +0200
>@@ -1782,7 +1782,7 @@
> modifier_mask =3D 0;
> button =3D 0;
> builtin_cancel_zoom(ge);
>- if (term && term->set_cursor) {
>+ if (term && term->set_cursor && term_initialised) {
> term->set_cursor(0, 0, 0);
> if (mouse_setting.annotate_zoom_box && term->put_tmptext) {
> term->put_tmptext(1, "");
>
>
>I am not certain this fix is corrent, since
>term->set_cursor() is also called from builtin_cancel_zoom()
>on the line above your new test.
> =20
>
No, builtin_cancel_zoom returns before calling term->set_cursor()=20
because of the following test :
*if* (!setting_zoom_region)
*return* (char *) 0;
>Would it not be better to make sure your WXWIDGETS_set_cursor()
>routine does not segfault. Here is the routine for x11, where you
>can see that if the communication channel is not initialized then
>nothing happens:
>
> =20
>
Of course, I can make such a test. And I will. I thought it would be=20
easier to fix the calling path ;-)
Greetings,
Timoth=C3=A9e
|