Fix for issue #4118 (closed), it now saves the scene without capturing a thumbnail if in the script editor.