Commit 865fcbea authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

fixed possible use of uninitialized variables

parent 3f1888da
...@@ -180,6 +180,7 @@ ok_clicked_cb (GtkWidget *widget, ...@@ -180,6 +180,7 @@ ok_clicked_cb (GtkWidget *widget,
g_settings_set_string (data->settings, PREF_CONTACT_SHEET_TEMPLATE, template); g_settings_set_string (data->settings, PREF_CONTACT_SHEET_TEMPLATE, template);
mime_type = NULL; mime_type = NULL;
file_extension = NULL;
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("filetype_combobox")), &iter)) { if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("filetype_combobox")), &iter)) {
gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("filetype_liststore")), gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("filetype_liststore")),
&iter, &iter,
...@@ -206,6 +207,7 @@ ok_clicked_cb (GtkWidget *widget, ...@@ -206,6 +207,7 @@ ok_clicked_cb (GtkWidget *widget,
columns = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton"))); columns = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (GET_WIDGET ("cols_spinbutton")));
g_settings_set_int (data->settings, PREF_CONTACT_SHEET_COLUMNS, columns); g_settings_set_int (data->settings, PREF_CONTACT_SHEET_COLUMNS, columns);
sort_type = NULL;
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("sort_combobox")), &iter)) { if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (GET_WIDGET ("sort_combobox")), &iter)) {
gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("sort_liststore")), gtk_tree_model_get (GTK_TREE_MODEL (GET_WIDGET ("sort_liststore")),
&iter, &iter,
......
...@@ -107,11 +107,11 @@ completion_job_new_for_uri (DialogData *data, ...@@ -107,11 +107,11 @@ completion_job_new_for_uri (DialogData *data,
job->data = dialog_data_ref (data); job->data = dialog_data_ref (data);
job->uri = g_strdup (uri); job->uri = g_strdup (uri);
job->source = gth_main_get_file_source_for_uri (job->uri); job->source = gth_main_get_file_source_for_uri (job->uri);
job->folder = NULL;
if (job->source == NULL) { if (job->source == NULL) {
completion_job_unref (job); completion_job_unref (job);
job = NULL; job = NULL;
} }
job->folder = NULL;
return job; return job;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment