In order to prevent Lens Errors from occuring, first, never allow your battery to run all of the way down. When operated in the lower half of the charge capacity the likelyhood of lens issues increases since it takes the most power to move the lens. Next, be careful, not to accidentally power the camer on while it is in a restricted space like a pocket or bag because if the lens hits an obstruction while open or opening it will be knocked out of alignment. Finally, a moderately hard impact (dropped or hit against the table or floor) cn also cause this issue.
Please keep in mind that my diagnosis & solutions provided are directly dependent on the accuracy of your description of the problem. As with any "do it yourself" fixes, success is a "team effort", since I can't see or touch the camera, and relies on the customer's manual dexterity and ability to follow the instructions well.
If you require additional information, please use the Reply to Expert Tab to contact me. Click the ratings only after our exchange is complete and you are satisfied.
If you are satisfied that my answer is accurate, or has provided a reasonable alternative solution please do not forget to rate my answer OK, Good or Excellent.