Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
8b2e2f6f
Commit
8b2e2f6f
authored
Jun 01, 2017
by
Alexander Wiebel
Browse files
[FIX] avoid segfault if no candidates are there
parent
7291ae2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
src/modules/pickingDVR/WMPickingDVR.cpp
src/modules/pickingDVR/WMPickingDVR.cpp
+1
-1
src/modules/pickingDVR/WVisiTrace.cpp
src/modules/pickingDVR/WVisiTrace.cpp
+6
-0
No files found.
src/modules/pickingDVR/WMPickingDVR.cpp
View file @
8b2e2f6f
...
...
@@ -298,6 +298,7 @@ void WMPickingDVR::moduleMain()
||
!
m_pickInProgress
)
{
m_curve3D
=
m_visiTrace
.
getLine
();
debugLog
()
<<
"Obtained line with "
<<
m_curve3D
.
size
()
<<
" elements."
;
updateCurveRendering
();
}
...
...
@@ -626,7 +627,6 @@ std::vector< std::pair< double, WPosition > > WMPickingDVR::computeVisiTraceCand
}
std
::
vector
<
std
::
pair
<
double
,
WPosition
>
>
candidates
(
0
);
std
::
cout
<<
vecIndicesLowerBounds
.
size
()
<<
" - "
<<
opacityJumps
.
size
()
<<
std
::
endl
;
for
(
size_t
id
=
0
;
id
<
opacityJumps
.
size
();
++
id
)
{
candidates
.
push_back
(
std
::
make_pair
(
opacityJumps
[
id
],
samples
[
vecIndicesLowerBounds
[
id
]].
second
)
);
...
...
src/modules/pickingDVR/WVisiTrace.cpp
View file @
8b2e2f6f
...
...
@@ -103,6 +103,12 @@ std::vector< std::vector< int > > WVisiTrace::getInverseLinearizedNodesRefs() co
void
WVisiTrace
::
performDijkstra
()
{
// Check if there is something to do
if
(
m_candidatePositions
.
size
()
==
0
||
m_candidateJumps
.
size
()
==
0
)
{
return
;
}
//using namespace boost;
typedef
boost
::
adjacency_list
<
boost
::
listS
,
boost
::
vecS
,
boost
::
directedS
,
boost
::
no_property
,
boost
::
property
<
boost
::
edge_weight_t
,
double
>
>
graph_t
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment