Skip to content

Commit 28b16e3

Browse files
committed
Fix crash if no streams are found
1 parent 4e74b7a commit 28b16e3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/mac.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
xcode-version: latest-stable
3232
- uses: actions/setup-python@v5
3333
with:
34-
python-version: '3.10'
34+
python-version: '3.12'
3535
- name: setup
3636
run: |
3737
cd ../..
@@ -40,7 +40,7 @@ jobs:
4040
- name: build
4141
run: |
4242
cd Build
43-
cmake -G "Xcode" -DPython_ROOT_DIR="$CONDA/envs/oe-python-plugin" -DCOPY_PYTHON_DL=ON ..
43+
cmake -G "Xcode" -DPython_ROOT_DIR="${{ env.pythonLocation }}" -DCOPY_PYTHON_DL=ON ..
4444
xcodebuild -configuration Release
4545
# - name: test
4646
# run: cd build && ctest
@@ -108,7 +108,7 @@ jobs:
108108
zipfile=${package}_${new_plugin_ver}.zip
109109
echo "zipfile=${zipfile}" >> $GITHUB_ENV
110110
zip -r -X $zipfile plugins shared
111-
- uses: actions/upload-artifact@v3
111+
- uses: actions/upload-artifact@v4
112112
with:
113113
name: ${{ env.zipfile }}
114114
path: ${{ env.zipfile }}

Source/PythonProcessor.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,11 @@ void PythonProcessor::parameterValueChanged(Parameter* param)
364364
else if (param->getName().equalsIgnoreCase("current_stream"))
365365
{
366366
String streamKey = param->getValueAsString();
367-
uint16 candidateStream = getDataStream(streamKey)->getStreamId();
367+
uint16 candidateStream = 0;
368+
if (auto *stream = getDataStream(streamKey))
369+
{
370+
candidateStream = stream->getStreamId();
371+
}
368372

369373
if(streamExists(candidateStream)
370374
&& currentStream != candidateStream)

0 commit comments

Comments
 (0)