Commit 17b4ebf2 authored by Jan Möbius's avatar Jan Möbius
Browse files

Added Safety functions if polyLine object cast fails

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5362 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 26c883b3
......@@ -29,6 +29,9 @@ void SelectionPlugin::togglePolyLineSelection(QMouseEvent* _event)
{
PolyLineObject* plo = PluginFunctions::polyLineObject( object );
if ( !plo )
return;
if( plo->line()->vertex_selections_available() ) {
if( target_idx < plo->line()->n_vertices()) {
if( plo->line()->vertex_selection( target_idx) == 0)
......@@ -52,6 +55,9 @@ void SelectionPlugin::togglePolyLineSelection(QMouseEvent* _event)
{
PolyLineObject* plo = PluginFunctions::polyLineObject( object );
if ( !plo )
return;
if( plo->line()->edge_selections_available() ){
if( target_idx < plo->line()->n_edges()) {
if( plo->line()->edge_selection( target_idx) == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment