From c6544348d254414795c5be06868b6d4a8ff925f1 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 23 Jun 2015 18:25:02 +0000
Subject: [PATCH] fix

---
 Fltk/graphicWindow.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Fltk/graphicWindow.cpp b/Fltk/graphicWindow.cpp
index 00519b657b..bee3b1162c 100644
--- a/Fltk/graphicWindow.cpp
+++ b/Fltk/graphicWindow.cpp
@@ -3524,7 +3524,10 @@ void graphicWindow::fillRecentHistoryMenu()
 
   static char recent[10][256];
   for(int i = 0; i < 10; i++){
-    strcpy(recent[i], CTX::instance()->recentFiles[i].c_str());
+    if(i < CTX::instance()->recentFiles.size())
+      strcpy(recent[i], CTX::instance()->recentFiles[i].c_str());
+    else
+      strcpy(recent[i], "");
     table[4 + i].text = recent[i];
     table[4 + i].user_data_ = (void*)recent[i];
   }
-- 
GitLab