From eed942c439ed61f3bc4e9b5e6ea259a4d86cf586 Mon Sep 17 00:00:00 2001 From: iobyte Date: Sat, 2 Jul 2022 20:42:07 +0000 Subject: [PATCH] trackeditor: fix recent files when saving git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8290 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 88914ad8755c037539d813be1ceb84873826e0c8 Former-commit-id: 563c6ca689afd132d422a20e45f66eeb9b801177 --- src/tools/trackeditor/gui/EditorFrame.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/trackeditor/gui/EditorFrame.java b/src/tools/trackeditor/gui/EditorFrame.java index fc5ec0762..d792dbb76 100644 --- a/src/tools/trackeditor/gui/EditorFrame.java +++ b/src/tools/trackeditor/gui/EditorFrame.java @@ -253,7 +253,7 @@ public class EditorFrame extends JFrame for (int i = 0; i < recentFiles.size(); i++) { - if (recentFilesMenu.getItem(i) != null) + if (i < recentFilesMenu.getItemCount()) { if (recentFilesMenu.getItem(i).getText() != recentFiles.get(i)) { @@ -1820,7 +1820,7 @@ public class EditorFrame extends JFrame } exportAc3d(); torcsPlugin.exportTrack(); - String fileName = Editor.getProperties().getPath() + sep + Editor.getProperties().getHeader().getName() + ".xml"; + String fileName = Editor.getProperties().getPath() + sep + Editor.getProperties().getHeader().getName() + ".prj.xml"; updateRecentFiles(fileName); } }