Oops, have to check the objects exist first. Pretty sure undoStack will exist if alPtr points to something real. Finishes fix for Issue #2