Fixed a segfault in document_find_by_filename().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@431 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
aa977cd821
commit
886b90f3d0
@ -4,6 +4,7 @@
|
|||||||
* src/highlighting.c: Replaced "/" by G_DIR_SEPARATOR_S.
|
* src/highlighting.c: Replaced "/" by G_DIR_SEPARATOR_S.
|
||||||
* src/utils.c: Fixed an issue, which let the build menu item
|
* src/utils.c: Fixed an issue, which let the build menu item
|
||||||
insensitive once a new file w/o template was opened.
|
insensitive once a new file w/o template was opened.
|
||||||
|
* src/document.c: Fixed a segfault in document_find_by_filename().
|
||||||
|
|
||||||
|
|
||||||
2006-06-10 Enrico Troeger <enrico.troeger@uvena.de>
|
2006-06-10 Enrico Troeger <enrico.troeger@uvena.de>
|
||||||
|
@ -65,8 +65,8 @@ gint document_find_by_filename(const gchar *filename, gboolean is_tm_filename)
|
|||||||
|
|
||||||
for(i = 0; i < GEANY_MAX_OPEN_FILES; i++)
|
for(i = 0; i < GEANY_MAX_OPEN_FILES; i++)
|
||||||
{
|
{
|
||||||
gchar *dl_fname = (is_tm_filename) ? doc_list[i].tm_file->file_name :
|
gchar *dl_fname = (is_tm_filename && doc_list[i].tm_file) ?
|
||||||
doc_list[i].file_name;
|
doc_list[i].tm_file->file_name : doc_list[i].file_name;
|
||||||
#ifdef GEANY_WIN32
|
#ifdef GEANY_WIN32
|
||||||
// ignore the case of filenames and paths under WIN32, causes errors if not
|
// ignore the case of filenames and paths under WIN32, causes errors if not
|
||||||
if (dl_fname && ! strcasecmp(dl_fname, filename)) return i;
|
if (dl_fname && ! strcasecmp(dl_fname, filename)) return i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user