Cancel image insert when deleting a temporary image.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 03:54:31 +0000 (05:54 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Apr 2011 04:41:06 +0000 (06:41 +0200)
src/main/java/net/pterodactylus/sone/core/Core.java

index f8cee11..7183063 100644 (file)
@@ -1931,6 +1931,10 @@ public class Core implements IdentityListener, UpdateListener, ImageInsertListen
                synchronized (temporaryImages) {
                        temporaryImages.remove(imageId);
                }
+               Image image = getImage(imageId, false);
+               if (image != null) {
+                       imageInserter.cancelImageInsert(image);
+               }
        }
 
        /**