]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/poem/wxpoem.cpp
Don't access null tip_window pointer [ 1767485 ] wxGtk uses private API, breaks with...
[wxWidgets.git] / demos / poem / wxpoem.cpp
index 7464f76cd1c7b2756ec1c212ee7518a8a1f89726..13da0411e9c92d428e75c6aba8da84d8daa77de4 100644 (file)
@@ -179,8 +179,8 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y)
     // See what ACTUAL char height is
     if(m_normalFont)
         dc->SetFont(*m_normalFont);
-    long xx;
-    long yy;
+    wxCoord xx;
+    wxCoord yy;
     dc->GetTextExtent(_T("X"), &xx, &yy);
     char_height = (int)yy;
 
@@ -888,7 +888,7 @@ long MainWindow::DoSearch(void)
 
         // Only match if we're looking at a different poem
         // (no point in displaying the same poem again)
-        if ((ch == m_searchString[i]) && (last_poem_start != previous_poem_start))
+        if ((m_searchString[i] == ch) && (last_poem_start != previous_poem_start))
         {
             if (i == 0)
                 last_find = ftell(file);