[JW Lua] Finale crash when argument is nil

Thomas Weber thomas.weber at notengrafik.com
Tue Sep 8 06:25:59 CEST 2015


I found Finale is simply crashing with this script:


local function getStaffSpec(noteEntry)
    local staffSpec = finale.FCCurrentStaffSpec()
    staffSpec:LoadForEntry(noteEntry)
    return staffSpec
end

for entry in eachentry(finenv.Region()) do
    getStaffSpec(enty) -- misspelled
end


One can of course add a check in the script to make it fail gracefully, but I think ideally, such a check should be built into JW Lua itself.

Have a great day!
Thomas




More information about the JWLua mailing list