From: Carlos Garcia Campos Date: Mon, 9 Jul 2007 17:24:14 +0000 (+0000) Subject: Fix a crash when closing whith a form widget visible. X-Git-Tag: EVINCE_0_9_2~1 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=76ad09fa55c4e7aa5283fe503c5b21a41acd427f;p=evince.git Fix a crash when closing whith a form widget visible. 2007-07-09 Carlos Garcia Campos * shell/ev-view.c: (ev_view_form_field_text_save), (ev_view_form_field_choice_save): Fix a crash when closing whith a form widget visible. svn path=/trunk/; revision=2567 --- diff --git a/ChangeLog b/ChangeLog index 3e8ffd09..bffbc47e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-09 Carlos Garcia Campos + + * shell/ev-view.c: (ev_view_form_field_text_save), + (ev_view_form_field_choice_save): + + Fix a crash when closing whith a form widget visible. + 2007-07-09 Carlos Garcia Campos * shell/ev-view.c: (ev_view_form_field_button_create_widget): diff --git a/shell/ev-view.c b/shell/ev-view.c index 0bbef7db..2486bcd0 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1637,7 +1637,7 @@ ev_view_form_field_button_create_widget (EvView *view, EvFormField *field) { EvFormFieldButton *field_button = EV_FORM_FIELD_BUTTON (field); - GdkRegion *field_region; + GdkRegion *field_region = NULL; switch (field_button->type) { case EV_FORM_FIELD_BUTTON_PUSH: @@ -1711,6 +1711,9 @@ ev_view_form_field_text_save (EvView *view, { EvFormField *field; + if (!view->document) + return; + field = g_object_get_data (G_OBJECT (widget), "form-field"); if (field->changed) { @@ -1821,6 +1824,9 @@ ev_view_form_field_choice_save (EvView *view, { EvFormField *field; + if (!view->document) + return; + field = g_object_get_data (G_OBJECT (widget), "form-field"); if (field->changed) {