Don't attempt to draw a NULL bitmap, OSX doesn't like this. (i'd gather that none of the other platforms do either but on osx it causes a crash.

Originally committed to SVN as r3488.
This commit is contained in:
Amar Takhar 2009-09-05 04:06:38 +00:00
parent 53b3f8468c
commit c89dcae7fc
1 changed files with 2 additions and 2 deletions

View File

@ -1463,7 +1463,7 @@ void AudioDisplay::OnPaint(wxPaintEvent& event) {
DoUpdateImage();
wxPaintDC dc(this);
dc.DrawBitmap(*origImage,0,0);
if (origImage) dc.DrawBitmap(*origImage,0,0);
}
@ -1556,7 +1556,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
if (player && !player->IsPlaying() && origImage) {
// Draw bg
wxClientDC dc(this);
dc.DrawBitmap(*origImage,0,0);
if (origImage) dc.DrawBitmap(*origImage,0,0);
if (inside) {
// Draw cursor