forked from mia/Aegisub
Fixed uninited variable causing exception
Originally committed to SVN as r730.
This commit is contained in:
parent
064db890eb
commit
d0a7745d41
1 changed files with 5 additions and 2 deletions
|
@ -63,6 +63,7 @@ DirectSoundPlayer::DirectSoundPlayer() {
|
|||
directSound = NULL;
|
||||
thread = NULL;
|
||||
threadRunning = false;
|
||||
notificationEvent = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -222,7 +223,8 @@ void DirectSoundPlayer::Play(__int64 start,__int64 count) {
|
|||
buffer->Stop();
|
||||
|
||||
// Create notification event
|
||||
CloseHandle(notificationEvent);
|
||||
if (notificationEvent)
|
||||
CloseHandle(notificationEvent);
|
||||
notificationEvent = CreateEvent(NULL,false,false,NULL);
|
||||
|
||||
// Create notification interface
|
||||
|
@ -293,7 +295,8 @@ void DirectSoundPlayer::Stop(bool timerToo) {
|
|||
offset = 0;
|
||||
|
||||
// Close event handle
|
||||
CloseHandle(notificationEvent);
|
||||
if (notificationEvent)
|
||||
CloseHandle(notificationEvent);
|
||||
|
||||
// Stop timer
|
||||
if (timerToo && displayTimer) {
|
||||
|
|
Loading…
Reference in a new issue