tmx: fix warning: may be used uninitialized in this function