Changeset 611 in dev


Ignore:
Timestamp:
May 18, 2008, 6:20:49 PM (17 years ago)
Author:
dai_9181
Message:

pWindowInfo->pChildInfoのメモリ再確保ロジックに誤りがあったため、修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/abdev/RadProc.cpp

    r609 r611  
    283283    pWindowInfo->NumberOfChildWindows--;
    284284    for(i=ItemNum;i<pWindowInfo->NumberOfChildWindows;i++)
     285    {
    285286        pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i+1];
    286     if(ProjectInfo.windowInfos.size()==0) pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,1);
    287     else pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,pWindowInfo->NumberOfChildWindows*sizeof(CHILDINFO));
     287    }
     288    if( pWindowInfo->NumberOfChildWindows == 0 )
     289    {
     290        pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,1);
     291    }
     292    else
     293    {
     294        pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,pWindowInfo->NumberOfChildWindows*sizeof(CHILDINFO));
     295    }
    288296
    289297    DrawRadWindow(WndNum,pWindowInfo);
Note: See TracChangeset for help on using the changeset viewer.