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