core: Do not crash if ImportResource is cancelled
authorJens Georg <mail@jensge.org>
Thu, 29 Sep 2011 09:38:54 +0000 (11:38 +0200)
committerJens Georg <mail@jensge.org>
Thu, 29 Sep 2011 09:38:54 +0000 (11:38 +0200)
src/rygel/rygel-import-resource.vala

index eb195e0..dd28a70 100644 (file)
@@ -264,7 +264,7 @@ internal class Rygel.ImportResource : GLib.Object, Rygel.StateMachine {
     }
 
     private void finished_cb (Message message) {
-        if (this.status != TransferStatus.ERROR) {
+        if (this.status == TransferStatus.IN_PROGRESS) {
             if (!(message.status_code >= 200 && message.status_code <= 299)) {
                 this.status = TransferStatus.ERROR;