Skip to content

Commit 5d6cbab

Browse files
committed
More guards
1 parent 29282c2 commit 5d6cbab

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

code/ship/ship.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19698,6 +19698,9 @@ void ship_page_out_textures(int ship_index, bool release)
1969819698

1969919699
void ship_replace_active_texture(int ship_index, const char* old_name, const char* new_name)
1970019700
{
19701+
if (Ships[ship_index].model_instance_num < 0)
19702+
return;
19703+
1970119704
polymodel_instance* pmi = model_get_instance(Ships[ship_index].model_instance_num);
1970219705
modelinstance_replace_active_texture(pmi, old_name, new_name);
1970319706
}

0 commit comments

Comments
 (0)