Skip to content

Commit

Permalink
patch: add a null check for something that should never happen
Browse files Browse the repository at this point in the history
  • Loading branch information
Andersama committed Nov 28, 2021
1 parent 57cc917 commit cef5c61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/asio-input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,10 @@ class AudioCB : public juce::AudioIODeviceCallback {

void audioDeviceAboutToStart(juce::AudioIODevice *device)
{
if (device == nullptr) {
blog(LOG_INFO, "Attempting to start a device (nullptr)? This should never happen");
return;
}
blog(LOG_INFO, "Starting (%s)", device->getName().toStdString().c_str());
juce::String name = device->getName();
sample_rate = device->getCurrentSampleRate();
Expand Down

0 comments on commit cef5c61

Please sign in to comment.