summaryrefslogtreecommitdiff
path: root/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-04-27 17:38:49 -0500
committerBryan Bishop <kanzure@gmail.com>2012-04-27 17:38:49 -0500
commit86cb81a9d542c4bc3b7dc7f8e221637d3128ebd1 (patch)
tree7d67a8aacd7519cd405c2f4c1501dd26b939b5f8 /crystal.py
parented02842315303f0c96bc040073abb3f94efe0768 (diff)
TextPointerLabelParam sometimes doesn't point to anything useful
original-commit-id: 90cee9191e01720656819eef906fb5053108e606
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/crystal.py b/crystal.py
index 4458ee9..28b68b7 100644
--- a/crystal.py
+++ b/crystal.py
@@ -1517,6 +1517,7 @@ class RawTextPointerLabelParam(PointerLabelParam):
class TextPointerLabelParam(PointerLabelParam):
"""this is a pointer to a text script"""
bank = False
+ text = None
def parse(self):
PointerLabelParam.parse(self)
address = calculate_pointer_from_bytes_at(self.address, bank=self.bank)
@@ -1524,8 +1525,11 @@ class TextPointerLabelParam(PointerLabelParam):
self.text = parse_text_engine_script_at(address, map_group=self.map_group, map_id=self.map_id, force=self.force, debug=self.debug)
def get_dependencies(self, recompute=False, global_dependencies=set()):
- global_dependencies.add(self.text)
- return [self.text]
+ if self.text:
+ global_dependencies.add(self.text)
+ return [self.text]
+ else:
+ return []
class MovementPointerLabelParam(PointerLabelParam):
pass