Index: /trunk/FACT++/src/Configuration.cc
===================================================================
--- /trunk/FACT++/src/Configuration.cc	(revision 11063)
+++ /trunk/FACT++/src/Configuration.cc	(revision 11064)
@@ -1052,10 +1052,13 @@
         fname = fname.substr(3);
 
-    if (pname==".libs")
+    if (pname.empty() || pname==".libs")
         return fname;
 
-    const size_t pos = pname.length()-6;
-    if (pname.substr(pos)=="/.libs")
-        pname = pname.substr(0, pos);
+    if (pname.length()>=6)
+    {
+        const size_t pos = pname.length()-6;
+        if (pname.substr(pos)=="/.libs")
+            pname = pname.substr(0, pos);
+    }
 
     return pname+'/'+fname;
