lensfun ver. bump

This commit is contained in:
Rmys
2021-06-04 13:34:09 +03:00
committed by GitHub
parent 3a39e61b48
commit 8b817da113
2 changed files with 74 additions and 3 deletions
@@ -0,0 +1,63 @@
diff --git a/libs/lensfun/lens.cpp b/libs/lensfun/lens.cpp
index 52b76658..b8430609 100644
--- a/libs/lensfun/lens.cpp
+++ b/libs/lensfun/lens.cpp
@@ -66,9 +66,10 @@ lfLens::lfLens (const lfLens &other)
Mounts = NULL;
MountNames.clear();
const char* const* otherMounts = other.GetMountNames();
- for (int i = 0; otherMounts[i]; i++)
- AddMount(otherMounts[i]);
-
+ if (otherMounts) {
+ for (int i = 0; otherMounts[i]; i++)
+ AddMount(otherMounts[i]);
+ }
for (auto *calibset : other.Calibrations)
Calibrations.push_back(new lfLensCalibrationSet(*calibset));
@@ -96,9 +97,10 @@ lfLens &lfLens::operator = (const lfLens &other)
Mounts = NULL;
MountNames.clear();
const char* const* otherMounts = other.GetMountNames();
- for (int i = 0; otherMounts[i]; i++)
- AddMount(otherMounts[i]);
-
+ if (otherMounts) {
+ for (int i = 0; otherMounts[i]; i++)
+ AddMount(otherMounts[i]);
+ }
for (auto *calibset : Calibrations)
delete calibset;
Calibrations.clear();
diff --git a/libs/lensfun/mount.cpp b/libs/lensfun/mount.cpp
index bd875baa..86f667cb 100644
--- a/libs/lensfun/mount.cpp
+++ b/libs/lensfun/mount.cpp
@@ -28,8 +28,10 @@ lfMount::lfMount (const lfMount &other)
MountCompat.clear();
const char* const* otherMounts = other.GetCompats();
- for (int i = 0; otherMounts[i]; i++)
- AddCompat(otherMounts[i]);
+ if (otherMounts) {
+ for (int i = 0; otherMounts[i]; i++)
+ AddCompat(otherMounts[i]);
+ }
}
lfMount &lfMount::operator = (const lfMount &other)
@@ -40,9 +42,10 @@ lfMount &lfMount::operator = (const lfMount &other)
MountCompat.clear();
const char* const* otherMounts = other.GetCompats();
- for (int i = 0; otherMounts[i]; i++)
- AddCompat(otherMounts[i]);
-
+ if (otherMounts) {
+ for (int i = 0; otherMounts[i]; i++)
+ AddCompat(otherMounts[i]);
+ }
return *this;
}
+11 -3
View File
@@ -14,10 +14,11 @@
<IsA>library</IsA>
<Summary>A programming library for rectifying and simulating photographic lens distortions</Summary>
<Description>lensfun provides an open source database of photographic lenses and their characteristics. The library provides also the necessary set of algorithms for correcting images based on detailed knowledge of lens properties and calibration data.</Description>
<Archive sha1sum="1d978b15aa7304d66a4931fa37ca9f8f89396c16" type="targz">https://sourceforge.net/projects/lensfun/files/0.3.2/lensfun-0.3.2.tar.gz</Archive>
<Archive sha1sum="01c25c87ad34b490b12b86aef673caf61413aa5c" type="targz">https://sourceforge.net/projects/lensfun/files/0.3.95/lensfun-0.3.95.tar.gz</Archive>
<Patches>
<Patch level="1">upstream_Patch-47-respect-DESTDIR-when-installing-python-stuf.patch</Patch>
<Patch level="1">upstream_Use-database-in-source-directory-while-running-tests.patch</Patch>
<!-- <Patch level="1">upstream_Patch-47-respect-DESTDIR-when-installing-python-stuf.patch</Patch> -->
<!-- <Patch level="1">upstream_Use-database-in-source-directory-while-running-tests.patch</Patch> -->
<Patch level="1">lensfun-segfault.patch</Patch>
</Patches>
<BuildDependencies>
<Dependency>doxygen</Dependency>
@@ -53,6 +54,13 @@
</Package>
<History>
<Update release="5">
<Date>2021-05-12</Date>
<Version>0.3.95</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="4">
<Date>2020-01-18</Date>
<Version>0.3.2</Version>