-rw-r--r-- | libopie2/opieui/oimageeffect.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libopie2/opieui/oimageeffect.cpp b/libopie2/opieui/oimageeffect.cpp index be47eb2..93719bc 100644 --- a/libopie2/opieui/oimageeffect.cpp +++ b/libopie2/opieui/oimageeffect.cpp @@ -2051,9 +2051,12 @@ void OImageEffect::normalize(QImage &img) if(intense > threshold_intensity) break; } - if(low == high) + if(low == high) { + free(histogram); + free(normalize_map); return; // zero span bound } + } // Stretch the histogram to create the normalized image mapping. for(i=0; i <= MaxRGB; i++){ |