diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-13 19:38:29 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-06-13 19:38:29 +0200 |
| commit | 7327f305efb1c6678722308cc5f9645dd39f451e (patch) | |
| tree | 0e15f4ad6f275aa689f5d66641d3d9ad59d15472 /Kernel/NewKit/MutableArray.hpp | |
| parent | 349fe48baf941b2d1b571d3a5d0d796823bae312 (diff) | |
MHR-31: Lots of fixes and improvements regarding the kernel.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Kernel/NewKit/MutableArray.hpp')
| -rw-r--r-- | Kernel/NewKit/MutableArray.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Kernel/NewKit/MutableArray.hpp b/Kernel/NewKit/MutableArray.hpp index f9c79301..a3ad4cb1 100644 --- a/Kernel/NewKit/MutableArray.hpp +++ b/Kernel/NewKit/MutableArray.hpp @@ -170,6 +170,13 @@ namespace NewOS Boolean Add(const T val) { auto* iterationNode = fFirstNode; + + if (!iterationNode) + { + fFirstNode = new MutableLinkedList<T>(); + iterationNode = fFirstNode; + } + MUST_PASS(iterationNode); while (iterationNode) |
