libct: add a nil check for mountError

Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 0d0fd95731)
Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
lifubang
2026-03-19 15:36:02 +00:00
parent f642515632
commit 0f0578e878
+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())) + ", "
} }