Gene flow in plant populations is largely determined by landscape heterogeneity. Both the shape of the pollination kernel and the spatial distribution of trees affect the distribution of pollen grains and the genotypes they harbour, but little is known about the relative contribution of each of these two factors. Using genetic markers we build a spatial network of pollination events between any two trees in a population of Prunus mahaleb, an insect-pollinated plant. Then, we apply tools from the science of complex networks to characterize the structure of such a mating network. Although the distribution of the number of pollen donors per tree is quite homogeneous, the identity of donors is distributed heterogeneously across the population. This results in a population structured in well-defined modules or compartments, formed by a group of mother trees and their shared pollen donors. Long-distance pollination events decrease the modular structure by favouring mating among all available mates. This increases gene flow across the entire population, reducing its genetic structure, and potentially decreasing the role of genetic drift.