Revision: 4941 http://geany.svn.sourceforge.net/geany/?rev=4941&view=rev Author: eht16 Date: 2010-05-22 19:39:03 +0000 (Sat, 22 May 2010)
Log Message: ----------- Fix crash when the toolbar is reloaded without any open documents.
Modified Paths: -------------- trunk/ChangeLog trunk/src/toolbar.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-05-22 19:38:49 UTC (rev 4940) +++ trunk/ChangeLog 2010-05-22 19:39:03 UTC (rev 4941) @@ -2,6 +2,8 @@
* src/ui_utils.c: Fix Undo/Redo button state after the last document has been closed. + * src/toolbar.c: + Fix crash when the toolbar is reloaded without any open documents.
2010-05-19 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/src/toolbar.c =================================================================== --- trunk/src/toolbar.c 2010-05-22 19:38:49 UTC (rev 4940) +++ trunk/src/toolbar.c 2010-05-22 19:39:03 UTC (rev 4941) @@ -288,9 +288,10 @@ if (main_status.main_window_realized) { GeanyDocument *doc = document_get_current(); + gboolean doc_changed = (doc != NULL) ? doc->changed : FALSE;
ui_document_buttons_update(); - ui_save_buttons_toggle(doc->changed); /* update save all */ + ui_save_buttons_toggle(doc_changed); /* update save all */ ui_update_popup_reundo_items(doc);
toolbar_apply_settings();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.