Added check for editor state during Edit menu display (ref #70).
This avoids a strange run-time error on Linux that appears to be caused by UpdateUI checks in Edit menu for editor object that is out of use.
This commit is contained in:
@@ -458,7 +458,7 @@ function IndicateAll(editor, lines, linee)
|
||||
|
||||
-- this function can be called for an editor tab that is already closed
|
||||
-- when there are still some pending events for it, so handle it.
|
||||
if not pcall(function() return editor:GetId() end) then return end
|
||||
if not pcall(function() editor:GetId() end) then return end
|
||||
|
||||
-- if markvars is not set in the spec, check for functions-only indicators
|
||||
if not (editor.spec and editor.spec.markvars) then
|
||||
|
||||
@@ -47,7 +47,7 @@ local function getControlWithFocus()
|
||||
or ide.osname == 'Macintosh' and
|
||||
ctrl:GetParent():GetId() == e:GetId()) then editor = e end
|
||||
end
|
||||
return editor
|
||||
return pcall(function() editor:GetId() end) and editor or nil
|
||||
end
|
||||
|
||||
local function onUpdateUIEditMenu(event)
|
||||
|
||||
Reference in New Issue
Block a user