Commit 4cfdd11
fix: crash in disassembler on hover
When hovering the disassembler tries to create an tooltip. If the user
hovers on the disassembly column or an earlier one, the model calculates
a negative cost type which will cause an out of bounds access error in
the cost array, even if the cost is not shown.
This patch changes the order of operations and adds an check to make
sure no out of bound access happens.
fixes: #6421 parent eb05bea commit 4cfdd11
1 file changed
+13
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
143 | 152 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | | - | |
| 157 | + | |
155 | 158 | | |
156 | | - | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
0 commit comments