Browse Source

Checking that both modules have the same number of components

Source commit: 5f2735d5b47d0985297f4e3d3c6fe4bea6e2fd63
Martin Prikryl 10 years ago
parent
commit
ce065d7325
1 changed files with 2 additions and 0 deletions
  1. 2 0
      source/windows/GUITools.cpp

+ 2 - 0
source/windows/GUITools.cpp

@@ -628,6 +628,8 @@ void __fastcall CopyImageList(TImageList * TargetList, TImageList * SourceList)
 //---------------------------------------------------------------------------
 void __fastcall CopyDataModule(TDataModule * TargetModule, TDataModule * SourceModule)
 {
+  DebugAssert(TargetModule->ComponentCount == SourceModule->ComponentCount);
+
   for (int Index = 0; Index < TargetModule->ComponentCount; Index++)
   {
     TComponent * TargetComponent = TargetModule->Components[Index];