Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
0d2fa3fe
Commit
0d2fa3fe
authored
Apr 03, 2018
by
DonLakeFlyer
Browse files
Fix crash if image not present
parent
3fae6644
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AnalyzeView/GeoTagController.cc
View file @
0d2fa3fe
...
@@ -259,6 +259,11 @@ void GeoTagWorker::run(void)
...
@@ -259,6 +259,11 @@ void GeoTagWorker::run(void)
int
maxIndex
=
std
::
min
(
_imageIndices
.
count
(),
_triggerIndices
.
count
());
int
maxIndex
=
std
::
min
(
_imageIndices
.
count
(),
_triggerIndices
.
count
());
maxIndex
=
std
::
min
(
maxIndex
,
_imageList
.
count
());
maxIndex
=
std
::
min
(
maxIndex
,
_imageList
.
count
());
for
(
int
i
=
0
;
i
<
maxIndex
;
i
++
)
{
for
(
int
i
=
0
;
i
<
maxIndex
;
i
++
)
{
int
imageIndex
=
_imageIndices
[
i
];
if
(
imageIndex
>=
_imageList
.
count
())
{
emit
error
(
tr
(
"Geotagging failed. Image requested not present."
));
return
;
}
QFile
fileRead
(
_imageList
.
at
(
_imageIndices
[
i
]).
absoluteFilePath
());
QFile
fileRead
(
_imageList
.
at
(
_imageIndices
[
i
]).
absoluteFilePath
());
if
(
!
fileRead
.
open
(
QIODevice
::
ReadOnly
))
{
if
(
!
fileRead
.
open
(
QIODevice
::
ReadOnly
))
{
emit
error
(
tr
(
"Geotagging failed. Couldn't open an image."
));
emit
error
(
tr
(
"Geotagging failed. Couldn't open an image."
));
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment