diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-10-10 14:17:56 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-10-10 14:17:56 -0400 |
commit | 26c66ab1b9806d097bd1080240435cb37642f141 (patch) | |
tree | 1c8d740ddf7c8c6a7de463c5aa5dfc1e98f6ddb0 | |
parent | 0bfea5e7728bf7bc9e25da3c828b60c6fc9c776f (diff) | |
download | glib-26c66ab1b9806d097bd1080240435cb37642f141.tar.gz |
Clarify g_propagate_error docs
I just ran into a bug that was caused by having src being a
persistent GError* that was not cleared after propagating it.
-rw-r--r-- | glib/gerror.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/glib/gerror.c b/glib/gerror.c index db31692b0..4eed58e9b 100644 --- a/glib/gerror.c +++ b/glib/gerror.c @@ -604,6 +604,10 @@ g_set_error_literal (GError **err, * * If @dest is %NULL, free @src; otherwise, moves @src into *@dest. * The error variable @dest points to must be %NULL. + * + * Note that @src is no longer valid after this call. If you want + * to keep using the same GError*, you need to set it to %NULL + * after calling this function on it. */ void g_propagate_error (GError **dest, |