From: nds Date: Wed, 1 Feb 2017 08:38:34 +0000 (+0300) Subject: 1. Fix for crash on Debian X-Git-Tag: V_2.7.0~297 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=504be7ba5c9e10415350211c9ec222d92c2b8b2d;p=modules%2Fshaper.git 1. Fix for crash on Debian 2. Remove CMake information message about trying to find debug tools --- diff --git a/CMakeCommon/FindDFBrowser.cmake b/CMakeCommon/FindDFBrowser.cmake index 46166288c..74e54563a 100644 --- a/CMakeCommon/FindDFBrowser.cmake +++ b/CMakeCommon/FindDFBrowser.cmake @@ -9,10 +9,6 @@ ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D #============================================================================= -IF(NOT DFBROWSER_FIND_QUIETLY) - MESSAGE(STATUS "Try to find DFBrowser at $ENV{DFBROWSER_ROOT_DIR}...") -ENDIF() - SET(DFBROWSER_ROOT_DIR $ENV{DFBROWSER_ROOT_DIR} CACHE PATH "Path to the DFBrowser directory") IF(EXISTS ${DFBROWSER_ROOT_DIR}) SET(DFBROWSER_INCLUDE_DIR "${DFBROWSER_ROOT_DIR}/include") diff --git a/CMakeCommon/FindVInspector.cmake b/CMakeCommon/FindVInspector.cmake index fcd7db44f..c86abdf05 100644 --- a/CMakeCommon/FindVInspector.cmake +++ b/CMakeCommon/FindVInspector.cmake @@ -9,10 +9,6 @@ ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D #============================================================================= -IF(NOT VINSPECTOR_FIND_QUIETLY) - MESSAGE(STATUS "Try to find VInspector at $ENV{VINSPECTOR_ROOT_DIR}...") -ENDIF() - SET(VINSPECTOR_ROOT_DIR $ENV{VINSPECTOR_ROOT_DIR} CACHE PATH "Path to the VInspector directory") IF(EXISTS $ENV{VINSPECTOR_ROOT_DIR}) SET(VINSPECTOR_INCLUDE_DIR "$ENV{VINSPECTOR_ROOT_DIR}/include") diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index 7f2fd8011..8a3852baa 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -316,7 +316,10 @@ void GeomAPI_AISObject::setColor(const int& theColor) aDimAIS->DimensionAspect()->SetCommonColor(aColor); } Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); - aContext->SetColor(anAIS, aColor, false); + if (!aContext.IsNull()) + aContext->SetColor(anAIS, aColor, false); + else + anAIS->SetColor(aColor); } double GeomAPI_AISObject::width() @@ -358,7 +361,10 @@ bool GeomAPI_AISObject::setColor(int theR, int theG, int theB) aDimAIS->DimensionAspect()->SetCommonColor(aColor); } Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); - aContext->SetColor(anAIS, aColor, false); + if (!aContext.IsNull()) + aContext->SetColor(anAIS, aColor, false); + else + anAIS->SetColor(aColor); return true; } @@ -464,13 +470,13 @@ bool GeomAPI_AISObject::setLineStyle(int theStyle) if (aDrawer->HasOwnWireAspect()) { aLineAspect = aDrawer->WireAspect(); } - Quantity_Color aCurrentColor; - Aspect_TypeOfLine aCurrentType; - Standard_Real aCurrentWidth; - aLineAspect->Aspect()->Values(aCurrentColor, aCurrentType, aCurrentWidth); - isChanged = aType != aCurrentType; - if (isChanged) { - aLineAspect->SetTypeOfLine(aType); + if (!aLineAspect.IsNull()) { + Handle(Graphic3d_AspectLine3d) aGraphicAspect = aLineAspect->Aspect(); + Aspect_TypeOfLine aCurrentType = aGraphicAspect->Type(); + isChanged = aType != aCurrentType; + if (isChanged) { + aLineAspect->SetTypeOfLine(aType); + } } } return isChanged;