diff --git a/app/src/gambas3/.src/Options/FOption.class b/app/src/gambas3/.src/Options/FOption.class index d2cf2b005..2072631eb 100644 --- a/app/src/gambas3/.src/Options/FOption.class +++ b/app/src/gambas3/.src/Options/FOption.class @@ -1661,12 +1661,14 @@ Private Sub RefreshLayout() $aLayout.Add(Html(sName)) Next - For Each sFile In Dir(sDir, "*.layout").Sort(gb.Natural) - sName = File.BaseName(sFile) - $aLayout.Add(sName) - If $cLayoutName.Exist(sName) Then sName = $cLayoutName[sName] - $aLayout.Add(Html(sName)) - Next + If IsDir(sDir) Then + For Each sFile In Dir(sDir, "*.layout").Sort(gb.Natural) + sName = File.BaseName(sFile) + $aLayout.Add(sName) + If $cLayoutName.Exist(sName) Then sName = $cLayoutName[sName] + $aLayout.Add(Html(sName)) + Next + Endif gvwLayout.Rows.Count = $aLayout.Count \ 2