Calling mitk::Image::GetPixelValueByWorldCoordinate() with a world position that translates to a negative pixel index causes invalid memory access.
The if statement around lines 186 seems to be modified in order to fix warnings. However, the logic was necessary, because itk::Index CAN have negative indices. I am not 100% sure about the meaning of the 2D case that is checked, but the 3D case will almost always lead to a crash when the resulting index is negative.
When this is fixed, a simple test case should be added to mitkImageText.cpp
Jan, I'm assigning this to you because git told me that you were the one who last touched that piece of code. However I can be of assistance, e.g. with constructing the test case.
This fix should make it into the snapshot release.