From c89dcae7fc2be47652e34380f93a97ed38d4cb0b Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sat, 5 Sep 2009 04:06:38 +0000 Subject: [PATCH] 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. --- aegisub/src/audio_display.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/src/audio_display.cpp b/aegisub/src/audio_display.cpp index cc3fd9bdc..826ca7f35 100644 --- a/aegisub/src/audio_display.cpp +++ b/aegisub/src/audio_display.cpp @@ -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