0 Replies Latest reply on Apr 30, 2015 11:56 AM by brendanT

    Closing extension on application quit

    brendanT Level 1

      I have an HTML panel that has the following code that runs on opening the extension.


      if (x == "allLayers") {

                  try {

                  var layerCount = app.project.activeItem.layers; 

                  } catch (e) {

                      alert("Do you have an active comp that contains layers?")




      It works great but my try - catch doesn't  work if the extension is left open when the application is quit and then restarted. Upon restart I get the error "null is not an object".


      Can I force after effects to close the extension when the user quits?