@@ -610,32 +610,33 @@ def generate_html(self, file_desc):
610
610
cur_text = self ._move_up_tree (cur_text , next_module )
611
611
cur_data = self ._move_up_tree (cur_data , next_module )
612
612
cur_bss = self ._move_up_tree (cur_bss , next_module )
613
- for name , dct in self .old_modules .items ():
614
- cur_text = tree_text
615
- cur_bss = tree_bss
616
- cur_data = tree_data
617
- modules = name .split (sep )
618
- while True :
619
- try :
620
- cur_text ["delta" ] -= dct ['.text' ]
621
- except KeyError :
622
- pass
623
- try :
624
- cur_bss ["delta" ] -= dct ['.bss' ]
625
- except KeyError :
626
- pass
627
- try :
628
- cur_data ["delta" ] -= dct ['.data' ]
629
- except KeyError :
630
- pass
631
- if not modules :
632
- break
633
- next_module = modules .pop (0 )
634
- if not any (cld ['name' ] == next_module for cld in cur_text ['children' ]):
635
- break
636
- cur_text = self ._move_up_tree (cur_text , next_module )
637
- cur_data = self ._move_up_tree (cur_data , next_module )
638
- cur_bss = self ._move_up_tree (cur_bss , next_module )
613
+ if self .old_modules :
614
+ for name , dct in self .old_modules .items ():
615
+ cur_text = tree_text
616
+ cur_bss = tree_bss
617
+ cur_data = tree_data
618
+ modules = name .split (sep )
619
+ while True :
620
+ try :
621
+ cur_text ["delta" ] -= dct ['.text' ]
622
+ except KeyError :
623
+ pass
624
+ try :
625
+ cur_bss ["delta" ] -= dct ['.bss' ]
626
+ except KeyError :
627
+ pass
628
+ try :
629
+ cur_data ["delta" ] -= dct ['.data' ]
630
+ except KeyError :
631
+ pass
632
+ if not modules :
633
+ break
634
+ next_module = modules .pop (0 )
635
+ if not any (cld ['name' ] == next_module for cld in cur_text ['children' ]):
636
+ break
637
+ cur_text = self ._move_up_tree (cur_text , next_module )
638
+ cur_data = self ._move_up_tree (cur_data , next_module )
639
+ cur_bss = self ._move_up_tree (cur_bss , next_module )
639
640
640
641
tree_rom = {
641
642
"name" : "ROM" ,
0 commit comments