Archive 19/01/2023.

There is a bug in ResourceCache::GetResource

haolly

It was asked in gitter.im here first, as @rku suggest me to debug and step into it, so I tried, and found the line https://github.com/urho3d/Urho3D/blob/master/Source/Urho3D/Resource/ResourceCache.cpp#L584 will always evaluated to true, maybe it could be write in the form as to the line https://github.com/urho3d/Urho3D/blob/master/Source/Urho3D/Resource/ResourceCache.cpp#L648
2017-12-18_213400

The picture says FindResource returns noResource , and the debugger goes though to 587 line

Eugene

I re-read you post twice or thrise and I don’t understand where is the bug and how to reproduce it.

haolly

@Eugene Sorry for my foolish :pensive:

Actually , there was no problem.

The one thing I do not know is how SharedPtr is converted to boolean value, there was no bool operator in this class

Eugene

There is operator T*

haolly

@Eugene
Thanks for you replay.
I learned a new thing : type conversion operator :grinning: