Commit 85d57079c33aa2ce70136b197812ee93caf70809
1 parent
ae79a4ed
Fix a bug in memGallery::readBlock
This line was intended to check the value of done, not for a null pointer. The code could cause an infinite loop in some circumstances. Signed-off-by: caotto <ottochar@gmail.com>
Showing
1 changed file
with
1 additions
and
1 deletions
sdk/plugins/gallery.cpp
| ... | ... | @@ -262,7 +262,7 @@ class memGallery : public Gallery |
| 262 | 262 | |
| 263 | 263 | TemplateList templates = MemoryGalleries::galleries[file].mid(block*Globals->blockSize, Globals->blockSize); |
| 264 | 264 | *done = (templates.size() < Globals->blockSize); |
| 265 | - block = done ? 0 : block+1; | |
| 265 | + block = *done ? 0 : block+1; | |
| 266 | 266 | return templates; |
| 267 | 267 | } |
| 268 | 268 | ... | ... |