frontend: Abort if obs-transitions failed to load

The frontend UI assumes transitions are always available and crashes if
none are present. Resolving the crashes resulted in a completely broken
UI, so it's safe to assume that transitions are a core requirement for a
working OBS.

Crash reports indicate that obs-transitions is failing to load for some
users, so we should handle the case where no transitions load and abort
with an error instead of crashing.
This commit is contained in:
Richard Stanway
2026-08-20 22:41:07 -04:00
committed by Ryan Foster
parent 080b8afcf7
commit e86c7e501e
2 changed files with 10 additions and 2 deletions
+2 -2
View File
@@ -1500,8 +1500,8 @@ private:
std::unordered_map<std::string, std::string> transitionNameToUuids;
int transitionDuration;
std::string currentTransitionUuid;
obs_source_t *fadeTransition;
obs_source_t *cutTransition;
obs_source_t *fadeTransition = nullptr;
obs_source_t *cutTransition = nullptr;
std::vector<QuickTransition> quickTransitions;
bool swapScenesMode = true;
@@ -73,6 +73,14 @@ void OBSBasic::InitDefaultTransitions()
}
}
// We require transitions in order to function, so exit with an error if
// obs-transitions failed to load for whatever reason.
if (!fadeTransition || !cutTransition) {
// FIXME: https://github.com/obsproject/obs-studio/issues/13394
throw "InitDefaultTransitions: Could not load default transitions. Try re-installing OBS Studio from "
"<a href=\"https://obsproject.com/\">obsproject.com</a>.";
}
for (OBSSource &tr : defaultTransitions) {
std::string uuid = obs_source_get_uuid(tr);