Editor Crash:: if (GetNumber() == NAME_NO_NUMBER_INTERNAL)

issue is achieving this logic in C++

This works fine

Issue is here, the part where I use do while loop in C++ and freezing the engine
But in blueprint the logic work perfectly