Skip to content

Commit

Permalink
Fix crash when right clicking raster layer (indentified by Coverity)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 12, 2016
1 parent 66938e9 commit 1e1dfca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -106,7 +106,7 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
// set layer scale visibility
menu->addAction( tr( "&Set Layer Scale Visibility" ), QgisApp::instance(), SLOT( setLayerScaleVisibility() ) );

if ( !vlayer->isInScaleRange( mCanvas->scale() ) )
if ( !layer->isInScaleRange( mCanvas->scale() ) )
menu->addAction( tr( "Zoom to Layer Scale" ), QgisApp::instance(), SLOT( zoomToLayerScale() ) );

// set layer crs
Expand Down

4 comments on commit 1e1dfca

@nyalldawson
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SebDieBln here you go - another one character fix for you. And this one fixes a hard crash in app... So... Your turn ;)

@SebDieBln
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still hunting, but this one is really hard to beat!
Maybe using some of the forensic tools for finding bugs by geographic(!) methods will increase my chances...

@nyalldawson
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SebDieBln on second thoughts, it's probably cheating to give me credit for this. I guess Coverity is winning at the moment ;)

@nyalldawson
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SebDieBln cool video btw. really interesting since in my non-freelance work I'm employed by the local law enforcement and we use a lot of those geographic profiling principles!

Please sign in to comment.