--- a/src/gui/image/qbmphandler.cpp Fri Feb 19 23:40:16 2010 +0200
+++ b/src/gui/image/qbmphandler.cpp Fri Mar 12 15:46:37 2010 +0200
@@ -144,7 +144,7 @@
static int calc_shift(int mask)
{
int result = 0;
- while (!(mask & 1)) {
+ while (mask && !(mask & 1)) {
result++;
mask >>= 1;
}