diff options
author | Dan Winship <danw@src.gnome.org> | 2005-08-22 14:28:27 +0000 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2005-08-22 14:28:27 +0000 |
commit | 8497b891763dfb802c97a0aee71d6d231c014804 (patch) | |
tree | 3e5d794ee8df8b6fa8d0b15f2159f5c24ba6ba3c /libsoup/soup-connection.c | |
parent | 77804c1a2ef2a8e000a9abf9a85e7e4d765e252f (diff) | |
download | libsoup-8497b891763dfb802c97a0aee71d6d231c014804.tar.gz |
Fix g_object_add/remove_weak_pointer usage to prevent a crash when
* libsoup/soup-connection.c (set_current_request,
clear_current_request): Fix g_object_add/remove_weak_pointer usage
to prevent a crash when canceling a request. From Tambet.
Diffstat (limited to 'libsoup/soup-connection.c')
-rw-r--r-- | libsoup/soup-connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c index d54ec6cb..d75ec4a4 100644 --- a/libsoup/soup-connection.c +++ b/libsoup/soup-connection.c @@ -346,7 +346,7 @@ set_current_request (SoupConnectionPrivate *priv, SoupMessage *req) req->status = SOUP_MESSAGE_STATUS_RUNNING; priv->cur_req = req; priv->in_use = TRUE; - g_object_add_weak_pointer (G_OBJECT (req), (gpointer *)priv->cur_req); + g_object_add_weak_pointer (G_OBJECT (req), (gpointer *)&priv->cur_req); } static void @@ -361,7 +361,7 @@ clear_current_request (SoupConnection *conn) priv->last_used = time (NULL); g_object_remove_weak_pointer (G_OBJECT (priv->cur_req), - (gpointer *)priv->cur_req); + (gpointer *)&priv->cur_req); priv->cur_req = NULL; } priv->in_use = FALSE; |