diff --git a/rtdata/languages/default b/rtdata/languages/default
index 9eea6dc17..51024db25 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -783,6 +783,7 @@ MAIN_MSG_OPERATIONCANCELLED;Operation cancelled
MAIN_MSG_PATHDOESNTEXIST;The path\n\n%1\n\ndoes not exist. Please set a correct path in Preferences.
MAIN_MSG_QOVERWRITE;Do you want to overwrite it?
MAIN_MSG_SETPATHFIRST;You first have to set a target path in Preferences in order to use this function!
+MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue.
MAIN_MSG_WRITEFAILED;Failed to write\n"%1"\n\nMake sure that the folder exists and that you have write permission to it.
MAIN_TAB_COLOR;Color
MAIN_TAB_COLOR_TOOLTIP;Shortcut: Alt-c
diff --git a/rtgui/filepanel.cc b/rtgui/filepanel.cc
index 7d0f9013b..b3e3668c5 100644
--- a/rtgui/filepanel.cc
+++ b/rtgui/filepanel.cc
@@ -279,9 +279,23 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector 0 && winGdiHandles <= 8500) // 0 means we don't have the rights to access the function, 8500 because the limit is 10000 and we need about 1500 free handles
+#endif
+ {
GThreadLock lock; // Acquiring the GUI... not sure that it's necessary, but it shouldn't harm
epanel = Gtk::manage (new EditorPanel ());
parent->addEditorPanel (epanel, pl->thm->getFileName());
+ }
+#ifdef WIN32
+ else {
+ Glib::ustring msg_ = Glib::ustring("") + M("MAIN_MSG_CANNOTLOAD") + " \"" + thm->getFileName() + "\" .\n" + M("MAIN_MSG_TOOMANYOPENEDITORS") + "";
+ Gtk::MessageDialog msgd (msg_, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
+ msgd.run ();
+ goto MAXGDIHANDLESREACHED;
+ }
+#endif
}
epanel->open(pl->thm, pl->pc->returnValue() );
@@ -301,7 +315,9 @@ bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnectorpc;
{