Skip to content

Commit

Permalink
Fix crash when a device list is missing from specific device settings
Browse files Browse the repository at this point in the history
If any of the device lists (bitwig, vst2, vst3) were empty or missing
from the config file it would result in a crash if parameters had
been defined for either knob1 or knob2.
  • Loading branch information
dozius committed Feb 3, 2024
1 parent 3e7273c commit 5e5acaa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<artifactId>twister-sister</artifactId>
<packaging>jar</packaging>
<name>Twister Sister</name>
<version>2.0.1</version>
<version>2.0.2</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/io/github/dozius/TwisterSisterExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ private void setupSpecificDeviceKnob(String controlKey, TwisterKnob knob, Device
TwisterKnob knob,
OnOffColorSupplier colorSupplier)
{
if (settings == null) {
return;
}

for (final SettingType setting : settings) {
if (setting.parameters().get(key) == null) {
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String getAuthor()
@Override
public String getVersion()
{
return "2.0.1";
return "2.0.2";
}

@Override
Expand Down

0 comments on commit 5e5acaa

Please sign in to comment.