Fix panic when using MySQL for events storage and no table created yet

This commit is contained in:
Roman Vynar
2018-07-18 18:16:37 +03:00
parent b563c6d1a1
commit 2a0159b73e
2 changed files with 8 additions and 2 deletions

View File

@@ -175,7 +175,9 @@ func (e *EventListener) getDababaseHandler() (*sql.DB, error) {
if err != nil {
firstRun = true
}
rows.Close()
if rows != nil {
rows.Close()
}
}
// Create table on first run.