Skip to content

Commit

Permalink
Fixes NullPointer in Import Manager
Browse files Browse the repository at this point in the history
The crash can happen if using a template file without a bundles section in it. 
This will fix it as bundles are not required.

Fixes #77
  • Loading branch information
BONNe committed Oct 22, 2020
1 parent ed82f7c commit dc05cd4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ private void createGenerators(YamlConfiguration config, @Nullable User user, Gam
reader = config.getConfigurationSection("bundles");
int bundleSize = 0;

for (String bundleId : reader.getKeys(false))
Set<String> keys = reader == null ? Collections.emptySet() : reader.getKeys(false);

for (String bundleId : keys)
{
GeneratorBundleObject generatorBundle = new GeneratorBundleObject();
generatorBundle.setUniqueId(prefix + bundleId.toLowerCase());
Expand Down

0 comments on commit dc05cd4

Please sign in to comment.