segfaults if a PuTTY or pterm did not close on exit and then you
either typed something via input_method_commit_event or changed the
line editing or echo settings.
git-svn-id: svn://svn.tartarus.org/sgt/putty@9908
cda61777-01e9-0310-a592-
d414129be87e
void input_method_commit_event(GtkIMContext *imc, gchar *str, gpointer data)
{
struct gui_data *inst = (struct gui_data *)data;
void input_method_commit_event(GtkIMContext *imc, gchar *str, gpointer data)
{
struct gui_data *inst = (struct gui_data *)data;
- lpage_send(inst->ldisc, CS_UTF8, str, strlen(str), 1);
+ if (inst->ldisc)
+ lpage_send(inst->ldisc, CS_UTF8, str, strlen(str), 1);
show_mouseptr(inst, 0);
term_seen_key_event(inst->term);
}
show_mouseptr(inst, 0);
term_seen_key_event(inst->term);
}
* Flush the line discipline's edit buffer in the case
* where local editing has just been disabled.
*/
* Flush the line discipline's edit buffer in the case
* where local editing has just been disabled.
*/
- ldisc_configure(inst->ldisc, inst->conf);
- if (inst->ldisc)
+ if (inst->ldisc) {
+ ldisc_configure(inst->ldisc, inst->conf);
ldisc_send(inst->ldisc, NULL, 0, 0);
ldisc_send(inst->ldisc, NULL, 0, 0);
/* Pass new config data to the terminal */
term_reconfig(inst->term, inst->conf);
/* Pass new config data to the back end */
/* Pass new config data to the terminal */
term_reconfig(inst->term, inst->conf);
/* Pass new config data to the back end */