Fix crash when detaching video

Originally committed to SVN as r5447.
This commit is contained in:
Thomas Goyne 2011-07-15 04:04:01 +00:00
parent 0cb42343e0
commit 401f026180
2 changed files with 9 additions and 0 deletions

View File

@ -162,6 +162,11 @@ VideoDisplay::VideoDisplay(
} }
SetCursor(wxNullCursor); SetCursor(wxNullCursor);
if (con->videoController->IsLoaded()) {
con->videoController->GetScriptSize(scriptW, scriptH);
OnVideoOpen();
}
} }
VideoDisplay::~VideoDisplay () { VideoDisplay::~VideoDisplay () {

View File

@ -62,6 +62,10 @@ VideoSlider::VideoSlider (wxWindow* parent, agi::Context *c)
slots.push_back(vc->AddSeekListener(&VideoSlider::SetValue, this)); slots.push_back(vc->AddSeekListener(&VideoSlider::SetValue, this));
slots.push_back(vc->AddVideoOpenListener(&VideoSlider::VideoOpened, this)); slots.push_back(vc->AddVideoOpenListener(&VideoSlider::VideoOpened, this));
slots.push_back(vc->AddKeyframesListener(&VideoSlider::KeyframesChanged, this)); slots.push_back(vc->AddKeyframesListener(&VideoSlider::KeyframesChanged, this));
if (vc->IsLoaded()) {
VideoOpened();
}
} }
void VideoSlider::SetValue(int value) { void VideoSlider::SetValue(int value) {