🪲 Prevent registering the same type twice

This commit is contained in:
Simon Schneegans
2022-01-27 06:53:30 +01:00
parent 68712fb842
commit acff1da6c2
+3 -1
View File
@@ -304,6 +304,7 @@ var PreferencesDialog = class PreferencesDialog {
// Each effect page is based on a template widget. This template contains the title
// and the preview button.
// clang-format off
if (GObject.type_from_name('BurnMyWindowsEffectPage') == null) {
BurnMyWindowsEffectPage =
GObject.registerClass({
GTypeName: 'BurnMyWindowsEffectPage',
@@ -370,7 +371,8 @@ var PreferencesDialog = class PreferencesDialog {
});
}
});
// clang-format on
// clang-format on
}
}
}