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


This crash has been observed and fixed for fltk-1.3.
http://www.fltk.org/str.php?L2003
http://www.fltk.org/str.php?L2004

I ran into it with current svn fltk 1.1.10,
and spent some time to debug it, only to find
out this was already fixed in 1.3

At that point of time apparently there were
no plans for an fltk-1.1.10. However
since that situation has changed, I think it makes
sense to apply this to the 1.1.10 branch.


Index: src/Fl_Help_View.cxx
===================================================================
--- src/Fl_Help_View.cxx        (revision 6669)
+++ src/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,13 @@
          if (get_attr(attrs, "SRC", attr, sizeof(attr))) {
            // Release the image twice to free it from memory...
            img = get_image(attr, width, height);
+           // 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();
+           }
            img->release();
-           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