diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp
index 898aa48bc3..11c6e1e44c 100644
--- a/src/html/htmlwin.cpp
+++ b/src/html/htmlwin.cpp
@@ -468,6 +468,8 @@ bool wxHtmlWindow::AppendToPage(const wxString& source)
bool wxHtmlWindow::LoadPage(const wxString& location)
{
+ wxCHECK_MSG( !location.empty(), false, "location must be non-empty" );
+
wxBusyCursor busyCursor;
wxFSFile *f;