mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kimgio: check how many bytes were written to the device
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
17c9ea78b0
commit
fa928e8e40
1 changed files with 4 additions and 1 deletions
|
@ -120,7 +120,10 @@ bool WebPHandler::write(const QImage &image)
|
|||
return false;
|
||||
}
|
||||
|
||||
device()->write(reinterpret_cast<const char*>(output), size);
|
||||
if (device()->write(reinterpret_cast<const char*>(output), size) != size) {
|
||||
WebPFree(output);
|
||||
return false;
|
||||
}
|
||||
WebPFree(output);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue