🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix: handle nil pointer dereference
Deluan65a792be3aea
diff --git a/persistence/sql_base_repository.go b/persistence/sql_base_repository.goindex 350cf206a..64115ea17 100644--- a/persistence/sql_base_repository.go+++ b/persistence/sql_base_repository.go@@ -99,8 +99,11 @@ func (r sqlRepository) executeSQL(sq Sqlizer) (int64, error) {return 0, err}start := time.Now()+ var c int64res, err := r.ormer.Raw(query, args...).Exec()- c, _ := res.RowsAffected()+ if res != nil {+ c, _ = res.RowsAffected()+ }r.logSQL(query, args, err, c, start)if err != nil {if err.Error() != "LastInsertId is not supported by this driver" {