Prevent crash when labels are not yet loaded yet the label dialog is somehow started (race condition?).