Ticket #5340: prefs_segfault_r14057.patch

File prefs_segfault_r14057.patch, 653 bytes (added by rustam, 9 years ago)
  • gtk/tr-prefs.c

    old new new_path_chooser_button (const tr_quark 
    239239  GtkWidget *  w = gtk_file_chooser_button_new (NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
    240240  const char * path = gtr_pref_string_get (key);
    241241  g_object_set_data (G_OBJECT (w), PREF_KEY, GINT_TO_POINTER(key));
    242   g_signal_connect (w, "selection-changed", G_CALLBACK (chosen_cb), core);
    243242
    244243  if (path != NULL)
    245244    gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (w), path);
    246245
     246  g_signal_connect (w, "selection-changed", G_CALLBACK (chosen_cb), core);
     247
    247248  return w;
    248249}
    249250