Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv23311

Modified Files:
        FreqWindow.cpp 
Log Message:
Fix crash on wx2.8

Index: FreqWindow.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/FreqWindow.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- FreqWindow.cpp      10 Apr 2007 02:21:45 -0000      1.49
+++ FreqWindow.cpp      22 May 2007 09:17:45 -0000      1.50
@@ -354,6 +354,13 @@
 
 void FreqWindow::DrawPlot()
 {
+   if (mUpdateRect.width == 0 || mUpdateRect.height == 0)
+   {
+      // Update rect not yet initialized properly
+      // (can happen during initialization phase on wx2.8)
+      return;
+   }
+
    if (mBitmap)
    {
       delete mBitmap;
@@ -361,7 +368,7 @@
    }
 
    mBitmap = new wxBitmap(mUpdateRect.width, mUpdateRect.height);
-
+   
    wxMemoryDC memDC;
    memDC.SelectObject(*mBitmap);
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to