Skip to content

Commit

Permalink
gradients: Don't crash gammaray
Browse files Browse the repository at this point in the history
gammaray etc. reads the properties and when displaying the value
calls the corresponding READ methods. This will lead to crashes
when calling "wrong" methods for gradients.
  • Loading branch information
peter-ha committed Oct 8, 2024
1 parent 920f7e2 commit ae5b398
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/common/QskGradient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,6 @@ void QskGradient::setLinearDirection( const QskLinearDirection& direction )

QskLinearDirection QskGradient::linearDirection() const
{
Q_ASSERT( m_type == Linear );

if ( m_type != Linear )
return QskLinearDirection( 0.0, 0.0, 0.0, 0.0 );

Expand Down Expand Up @@ -644,8 +642,6 @@ void QskGradient::setRadialDirection( const QskRadialDirection& direction )

QskRadialDirection QskGradient::radialDirection() const
{
Q_ASSERT( m_type == Radial );

if ( m_type != Radial )
return QskRadialDirection( 0.5, 0.5, 0.0 );

Expand Down Expand Up @@ -683,8 +679,6 @@ void QskGradient::setConicDirection( const QskConicDirection& direction )

QskConicDirection QskGradient::conicDirection() const
{
Q_ASSERT( m_type == Conic );

if ( m_type != Conic )
return QskConicDirection( 0.5, 0.5, 0.0, 0.0 );

Expand Down

0 comments on commit ae5b398

Please sign in to comment.