Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
07706d89
Commit
07706d89
authored
9 years ago
by
Harry Jeffery
Browse files
Options
Downloads
Patches
Plain Diff
Refs #11355 Fix segfault when passing invalid projection
parent
b155db6f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp
+1
-2
1 addition, 2 deletions
Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp
with
1 addition
and
2 deletions
Code/Mantid/Framework/MDAlgorithms/src/CutMD.cpp
+
1
−
2
View file @
07706d89
...
@@ -282,7 +282,6 @@ void CutMD::exec() {
...
@@ -282,7 +282,6 @@ void CutMD::exec() {
const
IMDEventWorkspace_sptr
inWS
=
getProperty
(
"InputWorkspace"
);
const
IMDEventWorkspace_sptr
inWS
=
getProperty
(
"InputWorkspace"
);
const
size_t
numDims
=
inWS
->
getNumDims
();
const
size_t
numDims
=
inWS
->
getNumDims
();
const
ITableWorkspace_sptr
projection
=
getProperty
(
"Projection"
);
const
ITableWorkspace_sptr
projection
=
getProperty
(
"Projection"
);
const
bool
haveProjection
=
!
(
*
getProperty
(
"Projection"
)).
isDefault
();
std
::
vector
<
std
::
vector
<
double
>>
pbins
(
5
);
std
::
vector
<
std
::
vector
<
double
>>
pbins
(
5
);
pbins
[
0
]
=
getProperty
(
"P1Bin"
);
pbins
[
0
]
=
getProperty
(
"P1Bin"
);
pbins
[
1
]
=
getProperty
(
"P2Bin"
);
pbins
[
1
]
=
getProperty
(
"P2Bin"
);
...
@@ -292,7 +291,7 @@ void CutMD::exec() {
...
@@ -292,7 +291,7 @@ void CutMD::exec() {
const
bool
noPix
=
getProperty
(
"NoPix"
);
const
bool
noPix
=
getProperty
(
"NoPix"
);
// Check Projection format
// Check Projection format
if
(
haveP
rojection
)
{
if
(
p
rojection
)
{
auto
colNames
=
projection
->
getColumnNames
();
auto
colNames
=
projection
->
getColumnNames
();
if
(
colNames
.
size
()
!=
4
||
if
(
colNames
.
size
()
!=
4
||
std
::
find
(
colNames
.
begin
(),
colNames
.
end
(),
"name"
)
==
colNames
.
end
()
||
std
::
find
(
colNames
.
begin
(),
colNames
.
end
(),
"name"
)
==
colNames
.
end
()
||
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment