fixing Fatal error: Call to a member function logicToPhysical() on a non-object 

fixes #5808 

@karlitschek @icewind1991 @ringmaster THX