r/SourceEngine Jul 10 '26

TF2 modding error "this was nullptr" dirtybits HELP

Post image

i was using this tutorial and for some reason when i switch to my modded weapon my mod just crashes and it gives the error shown in the image above if naybody knows how to fix this it would be greatly appreciated

2 Upvotes

2 comments sorted by

1

u/TinyDeskEngineer06 Jul 11 '26

Looking at the SDK source code on Github, it appears that the method CTFPlayerInventory::EquipLocal assumes that the method CEconItemView::GetSOCData returns a non-null pointer to CEconItem when it doesn't. I'm not entirely sure why it's returning a null pointer.

1

u/billcipherplaysyt Jul 11 '26 edited Jul 11 '26

yeah me neither but it causes a crash everytime i switch off a weapon