mirror of
https://github.com/pikami/cosmium.git
synced 2025-12-20 09:20:11 +00:00
Add more error handling and mutex guards
This commit is contained in:
@@ -45,7 +45,10 @@ func GetDatabase(serverName *C.char, databaseId *C.char) *C.char {
|
||||
return C.CString("")
|
||||
}
|
||||
|
||||
databaseJson, _ := json.Marshal(database)
|
||||
databaseJson, err := json.Marshal(database)
|
||||
if err != nil {
|
||||
return C.CString("")
|
||||
}
|
||||
return C.CString(string(databaseJson))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user