This paper shows the necessity to consider the thermal expansion compatibility of repair materials - especially the coefficients of thermal expansion and other physical properties (e. g. the Young modulus) - when choosing a suitable filling material to repair the structures of historic buildings. A numerical model was used to compute the temperature stress on a masonry element in dependence on variations in the thermal expansion coefficient, the shape and thickness of the filling, and the Young modulus. If the coefficients of thermal expansion are very different, the state of stress in the filling and its surroundings increases significantly. An inappropriately chosen filling material can thus cause its own degradation and damage to the structure.