forked from mia/Aegisub
More minox fixes (well, maybe) to subs preview
Originally committed to SVN as r1380.
This commit is contained in:
parent
4126b0e5bc
commit
a9df544cee
2 changed files with 5 additions and 4 deletions
|
@ -90,10 +90,11 @@ void SubtitlesPreview::SetStyle(AssStyle *_style) {
|
|||
delete tmpStyle;
|
||||
return;
|
||||
}
|
||||
|
||||
delete style;
|
||||
}
|
||||
|
||||
// Update
|
||||
delete style;
|
||||
style = tmpStyle;
|
||||
UpdateBitmap();
|
||||
}
|
||||
|
@ -149,7 +150,7 @@ void SubtitlesPreview::UpdateBitmap(int w,int h) {
|
|||
}
|
||||
|
||||
// Provider OK
|
||||
if (provider) {
|
||||
if (provider && provider->CanRaster()) {
|
||||
// Generate subtitles
|
||||
AssFile *subs = new AssFile();
|
||||
subs->LoadDefault();
|
||||
|
@ -166,8 +167,8 @@ void SubtitlesPreview::UpdateBitmap(int w,int h) {
|
|||
provider->DrawSubtitles(frame,0.1);
|
||||
}
|
||||
catch (...) {}
|
||||
delete provider;
|
||||
}
|
||||
if (provider) delete provider;
|
||||
|
||||
// Convert frame to bitmap
|
||||
wxMemoryDC dc(*bmp);
|
||||
|
|
|
@ -143,7 +143,7 @@ void CSRISubtitlesProvider::LoadSubtitles(AssFile *subs) {
|
|||
renderer = csri_renderer_default();
|
||||
if (!renderer) {
|
||||
delete subs;
|
||||
throw _T("No CSRI renderer available. Try installing one or switch to another subtitle provider.");
|
||||
throw _T("No CSRI renderer available, cannot show subtitles. Try installing one or switch to another subtitle provider.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue