Revision: 1614 http://svn.sourceforge.net/geany/?rev=1614&view=rev Author: ntrel Date: 2007-06-13 05:14:58 -0700 (Wed, 13 Jun 2007)
Log Message: ----------- Fix segfault when attempting to rename a new file from the Save As dialog.
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-06-13 12:00:23 UTC (rev 1613) +++ trunk/ChangeLog 2007-06-13 12:14:58 UTC (rev 1614) @@ -4,6 +4,9 @@ Use g_io_channel_win32_new_fd() as recommended in GLib docs for utils_set_up_io_channel() on Windows. (Unlikely to change behaviour though). + * src/callbacks.c: + Fix segfault when attempting to rename a new file from the Save As + dialog.
2007-06-12 Enrico Tröger enrico.troeger@uvena.de
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2007-06-13 12:00:23 UTC (rev 1613) +++ trunk/src/callbacks.c 2007-06-13 12:14:58 UTC (rev 1614) @@ -899,15 +899,16 @@ } else { - if (rename_file) - { // delete the previous file name - gchar *old_filename = utils_get_locale_from_utf8(doc_list[idx].file_name); - g_unlink(old_filename); - g_free(old_filename); - } + if (doc_list[idx].file_name != NULL) + { + if (rename_file) + { // delete the previous file name + gchar *old_filename = utils_get_locale_from_utf8(doc_list[idx].file_name);
- if (doc_list[idx].file_name != NULL) - { // create a new tm_source_file object otherwise tagmanager won't work correctly + g_unlink(old_filename); + g_free(old_filename); + } + // create a new tm_source_file object otherwise tagmanager won't work correctly tm_workspace_remove_object(doc_list[idx].tm_file, TRUE); doc_list[idx].tm_file = NULL; g_free(doc_list[idx].file_name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.