mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
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,6 +223,7 @@ void DirectSoundPlayer::Play(__int64 start,__int64 count) {
|
|||||||
buffer->Stop();
|
buffer->Stop();
|
||||||
|
|
||||||
// Create notification event
|
// Create notification event
|
||||||
|
if (notificationEvent)
|
||||||
CloseHandle(notificationEvent);
|
CloseHandle(notificationEvent);
|
||||||
notificationEvent = CreateEvent(NULL,false,false,NULL);
|
notificationEvent = CreateEvent(NULL,false,false,NULL);
|
||||||
|
|
||||||
@ -293,6 +295,7 @@ void DirectSoundPlayer::Stop(bool timerToo) {
|
|||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
// Close event handle
|
// Close event handle
|
||||||
|
if (notificationEvent)
|
||||||
CloseHandle(notificationEvent);
|
CloseHandle(notificationEvent);
|
||||||
|
|
||||||
// Stop timer
|
// Stop timer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user