You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-06-08 22:17:28 -07:00
Protecting crash when reading ONNX model with wrong format (Object Detection effect)
This commit is contained in:
@@ -98,6 +98,14 @@ void CVObjectDetection::detectObjectsClip(openshot::Clip &video, size_t _start,
|
||||
processingController->SetError(true, error_text);
|
||||
error = true;
|
||||
return;
|
||||
} catch (const std::exception& e) {
|
||||
processingController->SetError(true, std::string("Failed to load ONNX model: ") + e.what());
|
||||
error = true;
|
||||
return;
|
||||
} catch (...) {
|
||||
processingController->SetError(true, "Failed to load ONNX model: unknown error");
|
||||
error = true;
|
||||
return;
|
||||
}
|
||||
setProcessingDevice();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user