DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2163
Version: 1.1.10


I managed to get it wrong.
There was one img->release() to many and
it was unconditional. 

Index: Fl_Help_View.cxx
===================================================================
--- Fl_Help_View.cxx    (revision 6669)
+++ Fl_Help_View.cxx    (working copy)
@@ -892,7 +892,9 @@
            if (img) {
              img->draw(xx + x() - leftline_,
                        yy + y() - fl_height() + fl_descent() + 2);
-             img->release();
+             // See http://www.fltk.org/str.php?L2003
+             // See http://www.fltk.org/str.php?L2004
+             if((void*)img!=&broken_image) img->release();
            }

            xx += ww;
@@ -2367,8 +2369,12 @@
          if (get_attr(attrs, "SRC", attr, sizeof(attr))) {
            // Release the image twice to free it from memory...
            img = get_image(attr, width, height);
-           img->release();
-           img->release();
+           // See http://www.fltk.org/str.php?L2003
+           // See http://www.fltk.org/str.php?L2004
+           if((void*)img!=&broken_image){
+               img->release();
+               if(img->refcount() > 0) img->release();
+           }
          }
        }
       }


Link: http://www.fltk.org/str.php?L2163
Version: 1.1.10

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to