=================================================================== RCS file: /home/cvs/OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp,v retrieving revision 1.17 retrieving revision 1.19 diff -u -p -r1.17 -r1.19 --- OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp 2007/02/13 09:20:44 1.17 +++ OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp 2009/02/07 11:01:25 1.19 @@ -17,7 +17,7 @@ static char THIS_FILE[] = __FILE__; #endif // const TextBufferSize = 32768; -const TextBufferSize = 16384; +const int TextBufferSize = 16384; CAsir32guiView *theView; @@ -726,18 +726,20 @@ BOOL CAsir32guiView::Create(LPCTSTR lpszClassName, LPC FILE *fp = fopen("asirgui.hnd","w"); char *temp; - fprintf(fp,"%d",(unsigned int)theView->m_hWnd); - fclose(fp); - if ( temp = getenv("TEMP") ) { - int len; - char *name; - - len = strlen(temp); - name = (char *)malloc(len+BUFSIZ); - sprintf(name,"%s\\asirgui.hnd",temp); - fopen(name,"w"); + if ( fp ) { fprintf(fp,"%d",(unsigned int)theView->m_hWnd); fclose(fp); + if ( temp = getenv("TEMP") ) { + int len; + char *name; + + len = strlen(temp); + name = (char *)malloc(len+BUFSIZ); + sprintf(name,"%s\\asirgui.hnd",temp); + fopen(name,"w"); + fprintf(fp,"%d",(unsigned int)theView->m_hWnd); + fclose(fp); + } } return ret; }