3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-09 21:10:05 +01:00

Fix a NPE with brush using a global mask and no brush mask

Dieser Commit ist enthalten in:
aumgn 2012-03-15 16:42:56 +01:00
Ursprung fcd792191a
Commit d82111a4fc

Datei anzeigen

@ -177,15 +177,17 @@ public class BrushTool implements TraceTool {
BlockBag bag = session.getBlockBag(player);
EditSession editSession = session.createEditSession(player);
Mask existingMask = editSession.getMask();
if (existingMask == null) {
editSession.setMask(mask);
} else if (existingMask instanceof CombinedMask) {
((CombinedMask) existingMask).add(mask);
} else {
CombinedMask newMask = new CombinedMask(existingMask);
newMask.add(mask);
editSession.setMask(newMask);
if (mask != null) {
Mask existingMask = editSession.getMask();
if (existingMask == null) {
editSession.setMask(mask);
} else if (existingMask instanceof CombinedMask) {
((CombinedMask) existingMask).add(mask);
} else {
CombinedMask newMask = new CombinedMask(existingMask);
newMask.add(mask);
editSession.setMask(newMask);
}
}
try {