diff --git a/BlocksItemsCounter/Source/BlocksItemsCounter.as b/BlocksItemsCounter/Source/BlocksItemsCounter.as index 78d4763..afe03e5 100644 --- a/BlocksItemsCounter/Source/BlocksItemsCounter.as +++ b/BlocksItemsCounter/Source/BlocksItemsCounter.as @@ -33,7 +33,7 @@ void Main() { RefreshBlocks(); RefreshItems(); sortableobjects = objects; - sortableobjects.Sort(function(a,b) { return a.size > b.size; }); // Sort by size by default, it will be used as second sort criteria + if (sortableobjects.Length > 0) sortableobjects.Sort(function(a,b) { return a.size > b.size; }); // Sort by size by default, it will be used as second sort criteria refreshobject = false; } yield(); diff --git a/BlocksItemsCounter/info.toml b/BlocksItemsCounter/info.toml index 2e96e29..7a48ee7 100644 --- a/BlocksItemsCounter/info.toml +++ b/BlocksItemsCounter/info.toml @@ -3,5 +3,5 @@ name = "Blocks & Items Counter" author = "Beu" category = "Map Editor" siteid = 97 -version = "1.4" +version = "1.5" blocks = [ "Plugin_Blocks&ItemsCounter" ]