1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Minor tweak to get bring an edge case of oo1.DB.createFunction() into aggreement with its docs.

FossilOrigin-Name: 8d59ccd9f357fbed0b0790508ca9027194fc4b0131029f9f460c7b4bde806a5f
This commit is contained in:
stephan
2022-10-16 18:57:15 +00:00
parent 824bb5b8db
commit 2676fc58c8
3 changed files with 10 additions and 9 deletions

View File

@ -915,8 +915,9 @@ self.sqlite3ApiBootstrap.initializers.push(function(sqlite3){
toss3("Missing function-type properties.");
}
const pApp = opt.pApp;
if(undefined!==pApp && (('number'!==typeof pApp)
|| !capi.util.isInt32(pApp))){
if(undefined!==pApp &&
null!==pApp &&
(('number'!==typeof pApp) || !capi.util.isInt32(pApp))){
toss3("Invalid value for pApp property. Must be a legal WASM pointer value.");
}
const xDestroy = opt.xDestroy;