changeset 4521:dda0fbba1c46

[gaim-migrate @ 4799] Canceling early shouldn't be problematic. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 04 Feb 2003 21:36:56 +0000
parents 4fe661860577
children 0738264a52ad
files src/ft.c
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/ft.c	Tue Feb 04 20:30:17 2003 +0000
+++ b/src/ft.c	Tue Feb 04 21:36:56 2003 +0000
@@ -583,10 +583,13 @@
 	if (xfer->ops.end != NULL)
 		xfer->ops.end(xfer);
 
-	gaim_input_remove(xfer->watcher);
-	xfer->watcher = 0;
+	if (xfer->watcher != 0) {
+		gaim_input_remove(xfer->watcher);
+		xfer->watcher = 0;
+	}
 
-	close(xfer->fd);
+	if (xfer->fd != 0)
+		close(xfer->fd);
 
 	if (xfer->dest_fp != NULL) {
 		fclose(xfer->dest_fp);
@@ -608,10 +611,13 @@
 	if (xfer->ops.cancel != NULL)
 		xfer->ops.cancel(xfer);
 
-	gaim_input_remove(xfer->watcher);
-	xfer->watcher = 0;
+	if (xfer->watcher != 0) {
+		gaim_input_remove(xfer->watcher);
+		xfer->watcher = 0;
+	}
 
-	close(xfer->fd);
+	if (xfer->fd != 0)
+		close(xfer->fd);
 
 	if (xfer->dest_fp != NULL) {
 		fclose(xfer->dest_fp);