Commit 5cc30c2
committed
Address reviewer feedback on null-pointer guards
ExternalConnector.cpp: remove redundant curCommands null guard; the
else branch already returns NULL when curCommands is NULL, so the
while loop is unreachable with a null pointer.
KnownFile.cpp: replace wxASSERT with wxCHECK_RET so the mutual-
exclusion check on pClient/pServer fires in release builds too, not
only in debug. Drop the redundant pClient null guard added by the PR;
the contract enforced at the function entry is sufficient.
SharedFileList.cpp: bail out early when GetCurrentServer() returns
NULL instead of guarding individual uses of server inline. The inline
null guard added by the PR is removed since it is now covered by the
early return.1 parent 4b21c56 commit 5cc30c2
3 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1090 | 1090 | | |
1091 | 1091 | | |
1092 | 1092 | | |
1093 | | - | |
| 1093 | + | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | | - | |
| 1156 | + | |
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
708 | 711 | | |
709 | | - | |
| 712 | + | |
710 | 713 | | |
711 | 714 | | |
712 | 715 | | |
| |||
745 | 748 | | |
746 | 749 | | |
747 | 750 | | |
748 | | - | |
| 751 | + | |
749 | 752 | | |
750 | 753 | | |
751 | 754 | | |
| |||
0 commit comments