Commit bdc2af1 1 parent 1b2fdff commit bdc2af1 Copy full SHA for bdc2af1
File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -888,21 +888,22 @@ public boolean isExportingSnapshot() {
888
888
889
889
final public void createSnapshot (final Component target , final File defaultFile ) {
890
890
891
- CursorToken token = WaitCursorManager .showWaitCursor ();
892
- contentPane .getStatusBar ().setMessage ("Exporting image: " + defaultFile .getAbsolutePath ());
893
891
File file = selectSnapshotFile (defaultFile );
894
892
if (file == null ) {
895
893
return ;
896
894
}
897
895
898
- try {
899
- createSnapshotNonInteractive (target , file );
896
+ CursorToken token = null ;
897
+ try {
898
+ token = WaitCursorManager .showWaitCursor ();
899
+ contentPane .getStatusBar ().setMessage ("Exporting image: " + defaultFile .getAbsolutePath ());
900
+ createSnapshotNonInteractive (target , file );
900
901
} catch (IOException e ) {
901
902
log .error ("Error creating exporting image " , e );
902
903
MessageUtils .showMessage (("Error creating the image file: " + defaultFile + "<br> "
903
904
+ e .getMessage ()));
904
905
} finally {
905
- WaitCursorManager .removeWaitCursor (token );
906
+ if ( token != null ) WaitCursorManager .removeWaitCursor (token );
906
907
resetStatusMessage ();
907
908
}
908
909
You can’t perform that action at this time.
0 commit comments