From cc4c5687f214075905a058d562cb5c7abf67b8e9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 14 Oct 2010 14:42:34 +0200 Subject: [PATCH] Only allow unshelling a reply if both its post and its Sone are not shells. --- src/main/java/net/pterodactylus/sone/data/ReplyShell.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/data/ReplyShell.java b/src/main/java/net/pterodactylus/sone/data/ReplyShell.java index 11a6ee5..afcf295 100644 --- a/src/main/java/net/pterodactylus/sone/data/ReplyShell.java +++ b/src/main/java/net/pterodactylus/sone/data/ReplyShell.java @@ -181,7 +181,7 @@ public class ReplyShell extends Reply implements Shell { */ @Override public boolean canUnshell() { - return (sone != null) && (id != null) && (post != null) && (time != null) && (text != null); + return (sone != null) && (!(sone instanceof Shell)) && (id != null) && (post != null) && (!(post instanceof Shell)) && (time != null) && (text != null); } /** -- 2.7.4