libct: add a nil check for mountError

Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
lifubang
2026-03-19 15:36:02 +00:00
parent 837e98c984
commit 0d0fd95731
+1 -1
View File
@@ -110,7 +110,7 @@ func (e *mountError) Error() string {
if e.source != "" { if e.source != "" {
out += "src=" + e.source + ", " out += "src=" + e.source + ", "
if e.srcFile != nil { if e.srcFile != nil && e.srcFile.file != nil {
out += "srcType=" + string(e.srcFile.Type) + ", " out += "srcType=" + string(e.srcFile.Type) + ", "
out += "srcFd=" + strconv.Itoa(int(e.srcFile.file.Fd())) + ", " out += "srcFd=" + strconv.Itoa(int(e.srcFile.file.Fd())) + ", "
} }