From 9dbe12155b10f2a8a99f774ec6ebb157b257d0ec Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Thu, 9 Jul 2009 23:00:57 +0000 Subject: [PATCH] Fix crash for "save as" if sqlite3 backend not available. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18194 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/dialog-file-access.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gnome-utils/dialog-file-access.c b/src/gnome-utils/dialog-file-access.c index 5159f5a624..8337e9c071 100644 --- a/src/gnome-utils/dialog-file-access.c +++ b/src/gnome-utils/dialog-file-access.c @@ -300,6 +300,11 @@ gnc_ui_file_access( int type ) if( need_access_method_xml ) { gtk_combo_box_append_text( faw->cb_uri_type, "xml" ); ++access_method_index; + + // If we haven't set a default yet, set it now + if( active_access_method_index == -1 ) { + active_access_method_index = access_method_index; + } } g_assert( active_access_method_index >= 0 ); gtk_combo_box_set_active( faw->cb_uri_type, active_access_method_index );