Kaydet (Commit) 8ed86bb8 authored tarafından Enrico Tröger's avatar Enrico Tröger

Fix crash when the toolbar is reloaded without any open documents.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4941 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 9fec7e06
......@@ -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>
......
......@@ -288,9 +288,10 @@ static GtkWidget *toolbar_reload(const gchar *markup)
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment