diff options
-rw-r--r-- | widgets/table/e-table-specification.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-state.c | 4 | ||||
-rw-r--r-- | widgets/table/e-tree-table-adapter.c | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index e289ad2987..3fcc28689d 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -129,6 +129,10 @@ e_table_specification_load_from_file (ETableSpecification *specification, const char *filename) { xmlDoc *doc; + + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) + return FALSE; + doc = xmlParseFile (filename); if (doc) { xmlNode *node = xmlDocGetRootElement (doc); diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 4ce1bf6d3a..c66e5933e0 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -120,6 +120,10 @@ e_table_state_load_from_file (ETableState *state, const char *filename) { xmlDoc *doc; + + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) + return FALSE; + doc = xmlParseFile (filename); if (doc) { xmlNode *node = xmlDocGetRootElement(doc); diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index 61b1c9dd0d..e1bda25eba 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -925,6 +925,9 @@ open_file (ETreeTableAdapter *etta, const char *filename) int vers; gboolean model_default, saved_default; + if (!g_file_test (filename, G_FILE_TEST_EXISTS)) + return NULL; + doc = xmlParseFile (filename); if (!doc) return NULL; |