]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch from Mark Armstrong <marka@availsolutions.com>
authorJulian Smart <julian@anthemion.co.uk>
Thu, 4 Jul 2002 09:08:59 +0000 (09:08 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 4 Jul 2002 09:08:59 +0000 (09:08 +0000)
This patch fixes a debug assertion in tooltips.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/tooltip.cpp

index 930748cdbf1cf5b33ac47d6beaf93417fbf405fa..28bafa0c1603b74957d2651fbfa7db7d1f5f4863 100644 (file)
@@ -382,11 +382,9 @@ void wxToolTip::SetWindow(wxWindow *win)
     //     something like this where the derived class can do such things
     //     itself instead of wxToolTip "knowing" about them all
     wxComboBox *combo = wxDynamicCast(control, wxComboBox);
     //     something like this where the derived class can do such things
     //     itself instead of wxToolTip "knowing" about them all
     wxComboBox *combo = wxDynamicCast(control, wxComboBox);
-    if ( combo )
+    if ( combo && !(combo->GetWindowStyle() & wxCB_READONLY))
     {
     {
-        WXHWND hwndComboEdit = combo->GetWindowStyle() & wxCB_READONLY
-                                ? combo->GetHWND()
-                                : combo->GetEditHWND();
+        WXHWND hwndComboEdit = combo->GetEditHWND();
         if ( hwndComboEdit )
         {
             Add(hwndComboEdit);
         if ( hwndComboEdit )
         {
             Add(hwndComboEdit);