Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
kraxarn committed Jul 6, 2023
1 parent cec4f5e commit 4549be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/list/tracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void List::Tracks::load(const std::vector<lib::spt::track> &tracks, const std::s
void List::Tracks::load(const lib::spt::playlist &playlist)
{
auto *mainWindow = MainWindow::find(parent());
if (mainWindow->history()->currentPlaylist().id == playlist.id)
if (mainWindow != nullptr && mainWindow->history()->currentPlaylist().id == playlist.id)
{
lib::log::debug("Playlist to load already loaded, ignoring");
return;
Expand Down

0 comments on commit 4549be9

Please sign in to comment.