Skip to content

Commit 7813e16

Browse files
committed
Fix null versions in the contribution manager
1 parent 189d98a commit 7813e16

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

app/src/processing/app/contrib/DetailPanel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ public void setContribution(Contribution contrib) {
461461
desc.append("</font> ");
462462

463463
String version = contrib.getPrettyVersion();
464-
if (version != null) {
464+
if (version != null && !version.equals("null")) {
465465
desc.append(version);
466466
}
467467
desc.append(" <br/>");

app/src/processing/app/contrib/StatusPanel.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,24 @@ public void update(DetailPanel panel) {
259259

260260
if (panel.getContrib().isCompatible(Base.getRevision())) {
261261
if (installButton.isEnabled()) {
262-
updateLabel.setText(latestVersion + " available");
262+
if (latestVersion != null) {
263+
updateLabel.setText(latestVersion + " available");
264+
} else {
265+
updateLabel.setText("Available");
266+
}
263267
} else {
264-
updateLabel.setText(currentVersion + " installed");
268+
if (currentVersion != null && !currentVersion.equals("null")) {
269+
updateLabel.setText(currentVersion + " installed");
270+
} else {
271+
updateLabel.setText("Installed");
272+
}
265273
}
266274
} else {
267-
updateLabel.setText(currentVersion + " not compatible");
275+
if (currentVersion != null && !currentVersion.equals("null")) {
276+
updateLabel.setText(currentVersion + " not compatible");
277+
} else {
278+
updateLabel.setText("Not compatible");
279+
}
268280
}
269281

270282
if (latestVersion != null) {

0 commit comments

Comments
 (0)