mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
STR #2004 fix: got inspired from suggested modifications but limited their impact for broken_image test because it is not needed for osx and win32 platforms. thanks Mark and Sebastian. Works great in X11 now.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6168 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -893,7 +893,10 @@ Fl_Help_View::draw()
|
||||
if (img) {
|
||||
img->draw(xx + x() - leftline_,
|
||||
yy + y() - fl_height() + fl_descent() + 2);
|
||||
img->release();
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
if ((void*)img != &broken_image)
|
||||
#endif
|
||||
if(img->refcount()>0) img->release();
|
||||
}
|
||||
|
||||
xx += ww;
|
||||
@@ -2370,8 +2373,10 @@ Fl_Help_View::free_data() {
|
||||
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();
|
||||
#if !defined(WIN32) && !defined(__APPLE__)
|
||||
if ((void*)img!=&broken_image)
|
||||
#endif
|
||||
while (img->refcount()>0) img->release();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user