Skip to content

Commit 1ea75e7

Browse files
committed
Barcode: fix ImageView(nullptr,... deprecation warnings
This was discussed in #949.
1 parent 445217e commit 1ea75e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/Barcode.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ void Result::symbol(BitMatrix&& bits)
155155

156156
ImageView Result::symbol() const
157157
{
158-
return _symbol ? ImageView{_symbol->row(0).begin(), _symbol->width(), _symbol->height(), ImageFormat::Lum} : ImageView{};
158+
return _symbol && !_symbol->empty() ? ImageView{_symbol->row(0).begin(), _symbol->width(), _symbol->height(), ImageFormat::Lum}
159+
: ImageView{};
159160
}
160161

161162
void Result::zint(unique_zint_symbol&& z)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy