Games crashes when trying to set visibility button 4.26.2

If this isn’t the right place for this question, I’m sorry. Let me know and I’ll repost this in the proper place. So I am trying to set the visibility of a button in a pause menu and this causes the game (not editor) to crash every time. Any ideas or suggestions?

Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Commands.cpp] [Line: 1444] Null SRV (resource 0 bind 0) on UB Layout FInstancedStaticMeshVertexFactoryUniformShaderParameters