diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp
index a7a602f54e..4bed6f3f9c 100644
--- a/src/html/htmlcell.cpp
+++ b/src/html/htmlcell.cpp
@@ -356,7 +356,11 @@ IMPLEMENT_ABSTRACT_CLASS(wxHtmlWordCell, wxHtmlCell)
wxHtmlWordCell::wxHtmlWordCell(const wxString& word, const wxDC& dc) : wxHtmlCell()
{
m_Word = word;
- dc.GetTextExtent(m_Word, &m_Width, &m_Height, &m_Descent);
+ wxCoord w, h, d;
+ dc.GetTextExtent(m_Word, &w, &h, &d);
+ m_Width = w;
+ m_Height = h;
+ m_Descent = d;
SetCanLiveOnPagebreak(false);
m_allowLinebreak = true;
}