]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/choice.cpp
fixed crash introduced by recently applied autowidth patch (patch 1171455)
[wxWidgets.git] / src / os2 / choice.cpp
index 5e4d3e4ad2ffa9748227ab9090db9adbdead0536..9e4e5e1378557ef75b7ce4f141c244c13ce9ef18 100644 (file)
@@ -360,6 +360,7 @@ wxSize wxChoice::DoGetBestSize() const
     int                             nItems = GetCount();
     int                             nCx;
     int                             nCy;
+    wxFont                          vFont = (wxFont)GetFont();
 
     for (int i = 0; i < nItems; i++)
     {
@@ -386,7 +387,7 @@ wxSize wxChoice::DoGetBestSize() const
     wxGetCharSize( GetHWND()
                   ,&nCx
                   ,&nCy
-                  ,(wxFont*)&GetFont()
+                  ,&vFont
                  );
     nChoiceWidth += 5 * nCx;