Merge pull request #418 from h3poteto/iss-416

closes #416 Skip stop streaming if the object is not initialized
This commit is contained in:
AkiraFukushima 2018-07-01 22:58:01 +09:00 committed by GitHub
commit 1cd97b14c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -476,8 +476,10 @@ ipcMain.on('start-local-streaming', (event, ac) => {
}) })
ipcMain.on('stop-local-streaming', (event, _) => { ipcMain.on('stop-local-streaming', (event, _) => {
if (localStreaming !== null) {
localStreaming.stop() localStreaming.stop()
localStreaming = null localStreaming = null
}
}) })
let publicStreaming = null let publicStreaming = null
@ -511,8 +513,10 @@ ipcMain.on('start-public-streaming', (event, ac) => {
}) })
ipcMain.on('stop-public-streaming', (event, _) => { ipcMain.on('stop-public-streaming', (event, _) => {
if (publicStreaming !== null) {
publicStreaming.stop() publicStreaming.stop()
publicStreaming = null publicStreaming = null
}
}) })
let listStreaming = null let listStreaming = null
@ -583,8 +587,10 @@ ipcMain.on('start-tag-streaming', (event, obj) => {
}) })
ipcMain.on('stop-tag-streaming', (event, _) => { ipcMain.on('stop-tag-streaming', (event, _) => {
if (tagStreaming !== null) {
tagStreaming.stop() tagStreaming.stop()
tagStreaming = null tagStreaming = null
}
}) })
// sounds // sounds