From b54a28d3fd6c5607814ec8f325b7db332a065f7e Mon Sep 17 00:00:00 2001
From: Murai Takashi <tmurai01@gmail.com>
Date: Wed, 30 Aug 2017 05:43:37 +0900
Subject: [PATCH 2/2] vfs.cpp-Fix-gcc6-crash
---
src/system/kernel/fs/vfs.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/system/kernel/fs/vfs.cpp b/src/system/kernel/fs/vfs.cpp
index 35b7d90..ba1f4df 100644
a
|
b
|
fs_mount(char* path, const char* device, const char* fsName, uint32 flags,
|
7276 | 7276 | FileDeviceDeleter() : id(-1) {} |
7277 | 7277 | ~FileDeviceDeleter() |
7278 | 7278 | { |
7279 | | KDiskDeviceManager::Default()->DeleteFileDevice(id); |
| 7279 | if(KDiskDeviceManager::Default()) |
| 7280 | KDiskDeviceManager::Default()->DeleteFileDevice(id); |
7280 | 7281 | } |
7281 | 7282 | |
7282 | 7283 | partition_id id; |
… |
… |
fs_unmount(char* path, dev_t mountID, uint32 flags, bool kernel)
|
7782 | 7783 | partition->SetMountCookie(NULL); |
7783 | 7784 | |
7784 | 7785 | if (mount->owns_file_device) |
7785 | | KDiskDeviceManager::Default()->DeleteFileDevice(partition->ID()); |
| 7786 | if(KDiskDeviceManager::Default()) |
| 7787 | KDiskDeviceManager::Default()->DeleteFileDevice(partition->ID()); |
7786 | 7788 | partition->Unregister(); |
7787 | 7789 | } |
7788 | 7790 | |