SF.net SVN: geany:[3729] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Fri Apr 24 19:29:20 UTC 2009
Revision: 3729
http://geany.svn.sourceforge.net/geany/?rev=3729&view=rev
Author: eht16
Date: 2009-04-24 19:29:20 +0000 (Fri, 24 Apr 2009)
Log Message:
-----------
Fix a crash when USE_GIO_FILEMON is enabled at closing a document which was reloaded shortly before.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-04-24 19:28:55 UTC (rev 3728)
+++ trunk/ChangeLog 2009-04-24 19:29:20 UTC (rev 3729)
@@ -3,6 +3,9 @@
* src/keybindings.c:
Manually show the main notebook tab bar menu when Shift-F10 is
pressed. This broke when we disabled the default GTK tab bar menu.
+ * src/document.c:
+ Fix a crash when USE_GIO_FILEMON is enabled at closing a document
+ which was reloaded shortly before.
2009-04-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-04-24 19:28:55 UTC (rev 3728)
+++ trunk/src/document.c 2009-04-24 19:29:20 UTC (rev 3729)
@@ -435,13 +435,17 @@
/* Resets the 'ignore' file status after a reload action. */
-static gboolean monitor_reset_ignore(gpointer doc)
+static gboolean monitor_reset_ignore(gpointer data)
{
- g_return_val_if_fail(doc != NULL, FALSE);
-
- ((GeanyDocument *)doc)->priv->file_disk_status = FILE_OK;
- ui_update_tab_status(doc);
-
+ GeanyDocument *doc = data;
+ /* FIXME even if the doc is valid, it might be the wrong document if the original document was
+ * closed a new one opened which got this doc pointer while the timeout was active. Either
+ * remove the timeout when closing or document or remove the timeout completely. */
+ if (DOC_VALID(doc))
+ {
+ doc->priv->file_disk_status = FILE_OK;
+ ui_update_tab_status(doc);
+ }
return FALSE;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list