diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp
index 31cc7feb00..81d3a5d785 100644
--- a/src/html/htmlwin.cpp
+++ b/src/html/htmlwin.cpp
@@ -210,8 +210,10 @@ bool wxHtmlWindow::LoadPage(const wxString& location)
m_History.Add(new HtmlHistoryItem(m_OpenedPage, m_OpenedAnchor));
}
+ if (m_OpenedPageTitle == wxEmptyString)
+ OnSetTitle(wxFileNameFromPath(m_OpenedPage));
SetCursor(*wxSTANDARD_CURSOR);
-
+
wxYield();
m_tmpCanDrawLocks--;
Refresh();