[gnome-user-share/gnome-2-28] Avoid crashing when dbus_g_proxy_call() fails but without an error
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-user-share/gnome-2-28] Avoid crashing when dbus_g_proxy_call() fails but without an error
- Date: Tue, 10 Nov 2009 16:29:46 +0000 (UTC)
commit 2e44d90797a18381efbc3ff5bdfee6185aef873d
Author: Bastien Nocera <hadess hadess net>
Date: Tue Nov 10 16:27:13 2009 +0000
Avoid crashing when dbus_g_proxy_call() fails but without an error
See https://bugzilla.redhat.com/show_bug.cgi?id=533977
src/obexftp.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/obexftp.c b/src/obexftp.c
index 89a98ce..9db90e6 100644
--- a/src/obexftp.c
+++ b/src/obexftp.c
@@ -110,11 +110,14 @@ obexftp_stop (gboolean stop_manager)
return;
if (dbus_g_proxy_call (server_proxy, "Close", &err, G_TYPE_INVALID, G_TYPE_INVALID) == FALSE) {
- if (g_error_matches (err, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION) == FALSE ||
+ if (err == NULL ||
+ g_error_matches (err, DBUS_GERROR, DBUS_GERROR_REMOTE_EXCEPTION) == FALSE ||
dbus_g_error_has_name (err, "org.openobex.Error.NotStarted") == FALSE) {
- g_printerr ("Stopping Bluetooth ObexFTP server failed: %s\n",
- err->message);
- g_error_free (err);
+ if (err != NULL) {
+ g_printerr ("Stopping Bluetooth ObexFTP server failed: %s\n",
+ err->message);
+ g_error_free (err);
+ }
return;
}
g_error_free (err);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]