mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-07 17:15:29 +00:00
[js/web] check session ID in releaseSession() (#9105)
This commit is contained in:
parent
5e197698b8
commit
750e2e0481
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ export const createSession =
|
|||
export const releaseSession = (sessionId: number): void => {
|
||||
const wasm = getInstance();
|
||||
const session = activeSessions[sessionId];
|
||||
if (!session) {
|
||||
if (!Number.isSafeInteger(sessionId) || !session) {
|
||||
throw new Error('invalid session id');
|
||||
}
|
||||
const sessionHandle = session[0];
|
||||
|
|
|
|||
Loading…
Reference in a new issue