]> www.fi.muni.cz Git - evince.git/commitdiff
Fix a crash when closing whith a form widget visible.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 9 Jul 2007 17:24:14 +0000 (17:24 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 9 Jul 2007 17:24:14 +0000 (17:24 +0000)
2007-07-09  Carlos Garcia Campos  <carlosgc@gnome.org>
* 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

ChangeLog
shell/ev-view.c

index 3e8ffd099317d70d352dc35e2f85b06e96d75bdc..bffbc47e6e49b3453125e9325619036257a0f3b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-07-09  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * 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  <carlosgc@gnome.org>
 
        * shell/ev-view.c: (ev_view_form_field_button_create_widget):
index 0bbef7db3ff6738efb2351e357687ac9826d7221..2486bcd0462bd53da99951745940cc87c871b751 100644 (file)
@@ -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) {