Skip to content

Commit

Permalink
Fixed random crash when video is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
bjakja committed Jul 26, 2021
1 parent 39fbc36 commit b02fb5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Kaiplayer/RendererFFMS2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ void RendererFFMS2::SetFFMS2Position(int _time, bool starttime){

int RendererFFMS2::GetDuration()
{
return m_FFMS2->m_duration * 1000.0;
return m_FFMS2 ? m_FFMS2->m_duration * 1000.0 : 0;
}

int RendererFFMS2::GetFrameTime(bool start)
Expand Down
4 changes: 2 additions & 2 deletions Kaiplayer/VersionKainote.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
//StableReleaseLink: https://github.com/bjakja/Kainote/releases/download/v0.9.3.893/Kainote.x64.zip
//VersionKainoteX86: 0.9.3.910

#define VersionKainote "0.9.9.1394"
#define NumVersionKainote 0,9,9,1394
#define VersionKainote "0.9.9.1395"
#define NumVersionKainote 0,9,9,1395
2 changes: 1 addition & 1 deletion Kaiplayer/Videobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@ void VideoCtrl::ChangeOnScreenResolution(TabPanel *tab)

void VideoCtrl::RefreshTime()
{
if (!renderer)
if (!renderer && GetState() != None)
return;

STime videoTime;
Expand Down

0 comments on commit b02fb5d

Please sign in to comment.