diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-10-09 10:21:03 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-10-09 10:21:03 +0000 |
commit | 2ec89fbd8ae01bd7d3b2df4e698f1a221964b4bd (patch) | |
tree | 24021695899a964f546080aa378b2d3c8bb9c684 | |
parent | 65d800e956a95853cbe50feae01cb3d1f19fa75c (diff) | |
download | gvfs-2ec89fbd8ae01bd7d3b2df4e698f1a221964b4bd.tar.gz |
Add some debug spew and avoid crashing in case of code not properly
2008-10-09 Alexander Larsson <alexl@redhat.com>
* client/gdaemonfileinputstream.c:
(run_sync_state_machine):
Add some debug spew and avoid crashing in case of code not properly
setting the GError, as reported on the list.
svn path=/trunk/; revision=2046
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | client/gdaemonfileinputstream.c | 8 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2008-10-09 Alexander Larsson <alexl@redhat.com> + + * client/gdaemonfileinputstream.c: + (run_sync_state_machine): + Add some debug spew and avoid crashing in case of code not properly + setting the GError, as reported on the list. + 2008-10-06 Alexander Larsson <alexl@redhat.com> Patch from Andreas Henriksson diff --git a/client/gdaemonfileinputstream.c b/client/gdaemonfileinputstream.c index 8cdc3622..c6341a4f 100644 --- a/client/gdaemonfileinputstream.c +++ b/client/gdaemonfileinputstream.c @@ -446,8 +446,14 @@ run_sync_state_machine (GDaemonFileInputStream *file, } else { + /* We got reports of this crashing with io_error NULL. That shouldn't + happen, so try to spew some debug info and avoid crashing. */ + if (io_error == NULL) + g_warning ("run_sync_state_machine got error but no GError set. This should not happen. io_op was: %d\n", + io_op); g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, - _("Error in stream protocol: %s"), io_error->message); + _("Error in stream protocol: %s"), + io_error ? io_error->message : "Unknown error"); g_error_free (io_error); return FALSE; } |