Prevent crash when trying to export G-code from menu and there are no objects