X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d8268a1d64de58aab194e4d8ae800c755990aad..046d682f0f684977b7ba933a128f5c84e06ded0e:/src/os2/textctrl.cpp diff --git a/src/os2/textctrl.cpp b/src/os2/textctrl.cpp index be45467059..d315a58b5c 100644 --- a/src/os2/textctrl.cpp +++ b/src/os2/textctrl.cpp @@ -1188,8 +1188,9 @@ wxSize wxTextCtrl::DoGetBestSize() const { int nCx; int nCy; + wxFont vFont = (wxFont)GetFont(); - wxGetCharSize(GetHWND(), &nCx, &nCy, (wxFont*)&GetFont()); + wxGetCharSize(GetHWND(), &nCx, &nCy, &vFont); int wText = DEFAULT_ITEM_WIDTH; int hText = (int)(EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * .8);