Skip to content

Commit b5e6c18

Browse files
committed
Update ListUpdateableHelper.java
1 parent 2dc05c1 commit b5e6c18

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/org/hydev/mcpm/client/list/ListUpdateableHelper.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,17 @@ public ArrayList<String> listUpdateable(
5858
// to the list of PluginTrackerModels's version
5959

6060
if (rawResult.state() == CheckForUpdatesResult.State.SUCCESS) {
61-
ArrayList<String> outdatedNames = new ArrayList<>();
6261

6362
// get the ids of the plugins that are outdated from result
6463
ArrayList<String> outdated = new ArrayList<>();
6564
for (PluginModel pluginModel : rawResult.updatable().values()) {
66-
outdated.add(pluginModel.getLatestPluginVersion().get().meta().name());
65+
var version = pluginModel.getLatestPluginVersion();
66+
67+
if (version != null) {
68+
outdated.add(version.get().meta().name());
69+
}
6770
}
68-
return outdatedNames;
71+
return outdated;
6972
}
7073

7174
return new ArrayList<>();

0 commit comments

Comments
 (0)