X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=a40b12e756ca72cdc69c244852668802572b07c5;hb=ec41f5f45fe6f31bfec77ca9b41c9bf60bfcd5dc;hp=27c78527e8a7ee021f1e68c3fb3e86256ce626cf;hpb=dcf921e95da3881c75f57323733273c96027822e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 27c7852..a40b12e 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -236,7 +236,7 @@ public class Sone { * The post to remove */ public synchronized void removePost(Post post) { - if (posts.remove(post)) { + if (post.getSone().equals(this) && posts.remove(post)) { modificationCounter++; } }