mirror of https://github.com/odrling/Aegisub
Fixed uninited variable causing exception
Originally committed to SVN as r730.
This commit is contained in:
parent
064db890eb
commit
d0a7745d41
|
@ -63,6 +63,7 @@ DirectSoundPlayer::DirectSoundPlayer() {
|
||||||
directSound = NULL;
|
directSound = NULL;
|
||||||
thread = NULL;
|
thread = NULL;
|
||||||
threadRunning = false;
|
threadRunning = false;
|
||||||
|
notificationEvent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -222,7 +223,8 @@ void DirectSoundPlayer::Play(__int64 start,__int64 count) {
|
||||||
buffer->Stop();
|
buffer->Stop();
|
||||||
|
|
||||||
// Create notification event
|
// Create notification event
|
||||||
CloseHandle(notificationEvent);
|
if (notificationEvent)
|
||||||
|
CloseHandle(notificationEvent);
|
||||||
notificationEvent = CreateEvent(NULL,false,false,NULL);
|
notificationEvent = CreateEvent(NULL,false,false,NULL);
|
||||||
|
|
||||||
// Create notification interface
|
// Create notification interface
|
||||||
|
@ -293,7 +295,8 @@ void DirectSoundPlayer::Stop(bool timerToo) {
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
// Close event handle
|
// Close event handle
|
||||||
CloseHandle(notificationEvent);
|
if (notificationEvent)
|
||||||
|
CloseHandle(notificationEvent);
|
||||||
|
|
||||||
// Stop timer
|
// Stop timer
|
||||||
if (timerToo && displayTimer) {
|
if (timerToo && displayTimer) {
|
||||||
|
|
Loading…
Reference in New Issue