Skip to content

Commit 5380d88

Browse files
committed
small optimization to get_builtin_message_sender()
1 parent 3605f66 commit 5380d88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/parse/sexp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15228,8 +15228,8 @@ void sexp_send_message(int n)
1522815228

1522915229
ship* get_builtin_message_sender(const char* name) {
1523015230
auto ship_entry = ship_registry_get(name);
15231-
if (ship_entry && ship_entry->has_shipp()) {
15232-
return ship_entry->shipp();
15231+
if (ship_entry) {
15232+
return ship_entry->shipp_or_null();
1523315233
}
1523415234

1523515235
auto wing_index = wing_lookup(name);

0 commit comments

Comments
 (0)