Branch: refs/heads/master Author: Matthew Brush matt@geany.org Committer: Matthew Brush matt@geany.org Date: Wed, 25 Jul 2012 00:56:29 Commit: 5fff1e69c2c68f834f33ebb839127609f22a97bf https://github.com/geany/geany/commit/5fff1e69c2c68f834f33ebb839127609f22a97...
Log Message: ----------- Add NULL guard for reloading "untitled" documents
Previously it was using a GLIB assertion which shouldn't be used to detect a normal condition and so it caused a warning on the console output when clicking "Reload" with an "untitled" document.
Modified Paths: -------------- src/callbacks.c
Modified: src/callbacks.c 5 files changed, 4 insertions(+), 1 deletions(-) =================================================================== @@ -413,7 +413,10 @@ G_MODULE_EXPORT void on_reload_as_activate(GtkMenuItem *menuitem, gpointer user_ const gchar *charset = NULL;
g_return_if_fail(doc != NULL); - g_return_if_fail(doc->file_name != NULL); + + /* No need to reload "untitled" (non-file-backed) documents */ + if (doc->file_name == NULL) + return;
if (i >= 0) {
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).