diff --git a/pcbnew/tools/pcbnew_control.cpp b/pcbnew/tools/pcbnew_control.cpp index b49d68bc95..dff6c40b4d 100644 --- a/pcbnew/tools/pcbnew_control.cpp +++ b/pcbnew/tools/pcbnew_control.cpp @@ -942,6 +942,9 @@ static void moveNoFlagToVector( DLIST& aList, std::vector& aTarg static void moveNoFlagToVector( ZONE_CONTAINERS& aList, std::vector& aTarget, bool aIsNew ) { + if( aList.size() == 0 ) + return; + auto obj = aList.front(); int idx = 0;