- BuildDoorsX2(vMin, vMax,
- doorDlg.m_bSclMainHor, doorDlg.m_bSclMainVert,
- doorDlg.m_bSclTrimHor, doorDlg.m_bSclTrimVert,
- (LPCTSTR)doorDlg.m_fbTextureName,
- (LPCTSTR)doorDlg.m_trimTextureName,
- doorDlg.m_doorDirection);
+ if ( doorDlg.DoModal() == IDOK ) {
+ g_FuncTable.m_pfnDeleteBrushHandle( brush );
+
+ BuildDoorsX2( vMin, vMax,
+ doorDlg.m_bSclMainHor, doorDlg.m_bSclMainVert,
+ doorDlg.m_bSclTrimHor, doorDlg.m_bSclTrimVert,
+ (LPCTSTR)doorDlg.m_fbTextureName,
+ (LPCTSTR)doorDlg.m_trimTextureName,
+ doorDlg.m_doorDirection );