gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(fs));
Ian Chapman <[email protected]> Tue, 03 Jun 2014 20:53:16 -0400
| Newsgroups | gmane.comp.gnome.glade.user |
|---|---|
| Message-ID | <[email protected]> |
void
on_filechooserwidget2_selection_changed(GtkFileChooser *fs) {
printf("\n Selection changed. \n");
char *cName_pt;
cName_pt = gtk_file_chooser_get_uri(GTK_FILE_CHOOSER(fs));
printf("\n cName_pt = %s .\n", cName_pt); //Prints selected
file okay.
// strcpy(fileselected, cName_pt); //This gives segment fault?
strcpy(fileselected, test_pt); //This works okay, test=1234
passed to high level.
return;
Hi All,
I do not understand why I'm getting a segment fault from strcpy
using cName_pt in the above code. I can printf using cName_pt and it
prints the file that I selected using the glade gtkfilechooserwidget. I
must be doing something silly, I hope that someone can see what it is?
Regards Ian.
_______________________________________________
Glade-users maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users