Skip to content

Commit 7e5b820

Browse files
committed
Fixed issues found by PVS Studio static analyzer
1 parent d44f5da commit 7e5b820

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/gl/Surface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ namespace lsp
379379

380380
buf = serialize_clipping(buf);
381381
buf = serialize_color(buf, 1.0f, 1.0f, 1.0f, a);
382-
buf = serialize_texture(buf, t);
382+
serialize_texture(buf, t);
383383

384384
return make_command(index, C_TEXTURE);
385385
}
@@ -409,7 +409,7 @@ namespace lsp
409409

410410
buf = serialize_clipping(buf);
411411
buf = serialize_color(buf, color);
412-
buf = serialize_texture(buf, t);
412+
serialize_texture(buf, t);
413413

414414
return make_command(index, C_TEXTURE);
415415
}

src/main/gl/TextAllocator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,14 @@ namespace lsp
145145
NULL,
146146
TEXT_ATLAS_SIZE, TEXT_ATLAS_SIZE,
147147
0, gl::TEXTURE_ALPHA8);
148+
if (res != STATUS_OK)
149+
return NULL;
148150
}
149151

150152
res = pTexture->set_subimage(
151153
data,
152154
rect->nLeft, rect->nTop, rect->nWidth, rect->nHeight,
153155
stride);
154-
155156
if (res != STATUS_OK)
156157
return NULL;
157158

0 commit comments

Comments
 (0)