diff --git a/Sources/GameMP/Computer.cpp b/Sources/GameMP/Computer.cpp index a4d84e0..2316cf4 100644 --- a/Sources/GameMP/Computer.cpp +++ b/Sources/GameMP/Computer.cpp @@ -851,7 +851,7 @@ static void ComputerOn(void) _ppenPlayer->GetStats(_strStatsDetails, CST_DETAIL, _ctTextCharsPerRow); // if end of level - if (_ppenPlayer!=NULL && _ppenPlayer->m_bEndOfLevel || _pNetwork->IsGameFinished()) { + if (_ppenPlayer->m_bEndOfLevel || _pNetwork->IsGameFinished()) { // select statistics _cmtWantedType = CMT_STATISTICS; // if not end of level diff --git a/Sources/LWSkaExporter/ModelerMeshExporter.cpp b/Sources/LWSkaExporter/ModelerMeshExporter.cpp index ad3d752..cb55ee8 100644 --- a/Sources/LWSkaExporter/ModelerMeshExporter.cpp +++ b/Sources/LWSkaExporter/ModelerMeshExporter.cpp @@ -413,13 +413,13 @@ void ExportMesh_modeler(int iFaceForward) { char fnmOut[256]; char *strFileName; - _state = _meshEditOperations->state; - if (_meshEditOperations == NULL) { - _msg->error("Error!","Error _meshEditOperations is NULL!"); + _msg->error("Error!", "Error _meshEditOperations is NULL!"); return; } + _state = _meshEditOperations->state; + _ctPntIDs = _meshEditOperations->pointCount(_state,OPLYR_FG,EDCOUNT_ALL); _ctPolIDs = _meshEditOperations->polyCount(_state,OPLYR_FG,EDCOUNT_ALL); @@ -438,6 +438,7 @@ void ExportMesh_modeler(int iFaceForward) { _fpOutput = fopen(fnmOut, "w"); if (_fpOutput==NULL) { msgbox_modeler(_xpanf, "Can't open file!"); + return; } // write the mesh header diff --git a/Sources/WorldEditor/ToolTipWnd.cpp b/Sources/WorldEditor/ToolTipWnd.cpp index e996e64..a22c2b8 100644 --- a/Sources/WorldEditor/ToolTipWnd.cpp +++ b/Sources/WorldEditor/ToolTipWnd.cpp @@ -135,8 +135,8 @@ void CToolTipWnd::OnPaint() dc.SetTextColor( colInk); CDC *pDC = GetDC(); + if (pDC == NULL) return; pDC->SelectObject( &theApp.m_FixedFont); - if( pDC == NULL) return; INDEX ctLines = GetLinesCount(); for(INDEX iLine = 0; iLinem_CSGDesitnationCombo.GetSelectedBrushEntity(); - CBrush3D &brBrush = *penBrush->en_pbrBrush; - if (penBrush==NULL) return; + if (penBrush == NULL) return; + + CBrush3D &brBrush = *penBrush->en_pbrBrush; // remember current time as time when last mip brushing option has been used _fLastMipBrushingOptionUsed = _pTimer->GetRealTimeTick();