Revision: 5161 http://geany.svn.sourceforge.net/geany/?rev=5161&view=rev Author: ntrel Date: 2010-08-13 17:00:36 +0000 (Fri, 13 Aug 2010)
Log Message: ----------- Fix segfault on Tools->Reload Configuration when no documents are open (#3037079).
Modified Paths: -------------- branches/Geany-0_19_1/ChangeLog branches/Geany-0_19_1/NEWS branches/Geany-0_19_1/src/filetypes.c
Modified: branches/Geany-0_19_1/ChangeLog =================================================================== --- branches/Geany-0_19_1/ChangeLog 2010-08-13 14:54:27 UTC (rev 5160) +++ branches/Geany-0_19_1/ChangeLog 2010-08-13 17:00:36 UTC (rev 5161) @@ -3,6 +3,9 @@ * win32-config.h, geany.nsi, configure.ac, doc/geany.txt, doc/geany.html, wscript, geany_private.rc: Version bump. + * src/filetypes.c, NEWS: + Fix segfault on Tools->Reload Configuration when no documents are + open (#3037079).
2010-08-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: branches/Geany-0_19_1/NEWS =================================================================== --- branches/Geany-0_19_1/NEWS 2010-08-13 14:54:27 UTC (rev 5160) +++ branches/Geany-0_19_1/NEWS 2010-08-13 17:00:36 UTC (rev 5161) @@ -15,6 +15,8 @@ document name for menu items (#3038844). * File Browser: Allow Find in Files when no items are selected. * Fix build menu translation problems. + * Fix segfault on Tools->Reload Configuration when no documents are + open (#3037079). * Fix a memory leak (thanks to Daniel Marjamäki). * Use g_free instead of free (patch by Daniel Marjamäki, thanks).
Modified: branches/Geany-0_19_1/src/filetypes.c =================================================================== --- branches/Geany-0_19_1/src/filetypes.c 2010-08-13 14:54:27 UTC (rev 5160) +++ branches/Geany-0_19_1/src/filetypes.c 2010-08-13 17:00:36 UTC (rev 5161) @@ -1659,8 +1659,12 @@ /* filetypes_load_config() will skip not loaded filetypes */ filetypes_load_config(i, TRUE); } + + current_doc = document_get_current(); + if (!current_doc) + return; + /* update document styling */ - current_doc = document_get_current(); foreach_document(i) { if (current_doc != documents[i])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.