Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if active preset output texture is valid before copying #824

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/libprojectM/ProjectM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,13 @@ void ProjectM::StartPresetTransition(std::unique_ptr<Preset>&& preset, bool hard

if (m_activePreset)
{
preset->DrawInitialImage(m_activePreset->OutputTexture(), GetRenderContext());
auto outputTexture = m_activePreset->OutputTexture();

// Check if the output texture is valid by testing if the OpenGL texturing target enum has been initialized.
// In case of the initial preset transition, it is 0.
if (outputTexture->Type() != 0) {
preset->DrawInitialImage(outputTexture, GetRenderContext());
}
}

if (hardCut)
Expand Down