Fixed NPE in TradeList, also there is no point to log it when it happens.
Contributed by Sahar.
This commit is contained in:
@ -182,9 +182,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -182,9 +182,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -182,9 +182,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -182,9 +182,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -184,9 +184,8 @@ public class TradeList
|
||||
}
|
||||
|
||||
final WorldObject o = World.getInstance().findObject(objectId);
|
||||
if (!o.isItem())
|
||||
if (!(o instanceof ItemInstance))
|
||||
{
|
||||
LOGGER.warning(_owner.getName() + ": Trying to add something other than an item!");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user