Null pointer (NULL array pointer is passed) in function cvGetMat, 報這樣的錯

liulina603發表於2014-05-06

我的程式出錯在於:TgImage outimage;少個了static ,

DWORD CFacedoo::regiditFun()
{
     static char* pShowImgX;
     static TgImage outimage;//前面加了個static
     if ( bFirstreg )
    {
       bFirstreg = FALSE;
       pShowImgX = new char[384*288*3];
       outimage.pData = pShowImgX;
       outimage.width = g_Image.width;
       outimage.height = g_Image.height;
       outimage.nChannels = 3;
    }
     unsigned char* ShowpImg = (unsigned char*)pShowImgX;

     HWND hwnd  = GetDlgItem(IDC_STATIC_recimage)->GetSafeHwnd();

     HDC hDC=::GetDC(hwnd);

 

相關文章