summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinspectredc <inspectredc@gmail.com>2024-04-23 12:20:53 +0100
committerLywx <kiritodev01@gmail.com>2024-04-23 10:31:22 -0600
commitfc5e60f05edf16ae5e8b6e5e51c410ea236b259e (patch)
treee128bbdceeae8a4663f11fd147b94232280ce9d3
parent8aea1f89812ff7a4fba47f840d7a68be2c71bd3f (diff)
only check ptr not null
-rw-r--r--src/factories/sm64/GeoLayoutFactory.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/factories/sm64/GeoLayoutFactory.cpp b/src/factories/sm64/GeoLayoutFactory.cpp
index 16a2f57..4970c22 100644
--- a/src/factories/sm64/GeoLayoutFactory.cpp
+++ b/src/factories/sm64/GeoLayoutFactory.cpp
@@ -8,14 +8,11 @@
uint64_t RegisterAutoGen(uint32_t ptr, std::string type) {
- const auto segment = Companion::Instance->GetCurrSegmentNumber();
- if (segment.has_value()) {
- if (SEGMENT_NUMBER(ptr) == segment.value()) {
- YAML::Node node;
- node["type"] = type;
- node["offset"] = ptr;
- Companion::Instance->AddAsset(node);
- }
+ if (ptr != 0) {
+ YAML::Node node;
+ node["type"] = type;
+ node["offset"] = ptr;
+ Companion::Instance->AddAsset(node);
}
return ptr;