You don't provide declarations for the things you use or show how the return from this function is used, leaving us to guess what you intend and what you've done.
Having said that, shouldn't you return the empty texture rather than null?
If you later try to use the subscript operator to access a texture in the map you need to make sure the file key is correct otherwise you'll get a nullptr back.
If the MyAssetManager object is static/global are you sure that it has been created before LoadTexture is called?
It's really hard to guess because the true cause of the problem seems to be elsewhere. You might want to put together a small example that can be compiled and contains the minimum code necessary to demonstrate the problem. By doing so you are likely to find the the problem yourself, but otherwise you can post it here and we will probably be able to help you.