mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 02:34:23 -05:00
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:
committed by
Ryan Foster
parent
080b8afcf7
commit
e86c7e501e
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user