summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--fluid/Fluid_Image.cxx16
-rw-r--r--fluid/fluid.cxx7
3 files changed, 17 insertions, 9 deletions
diff --git a/CHANGES b/CHANGES
index c622151cc..532a6c5ee 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
CHANGES IN FLTK 1.1.0
+ - FLUID didn't register the image formats in the
+ fltk_images library, and had some other image
+ management problems.
- Fixed one more redraw bug in Fl_Browser_ where we
weren't using the box function to erase empty space in
the list.
diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx
index 2e94f4c4a..da934a093 100644
--- a/fluid/Fluid_Image.cxx
+++ b/fluid/Fluid_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.11 2002/08/09 22:57:00 easysw Exp $"
+// "$Id: Fluid_Image.cxx,v 1.7.2.9.2.12 2002/08/16 20:10:21 easysw Exp $"
//
// Pixmap label support for the Fast Light Tool Kit (FLTK).
//
@@ -156,7 +156,7 @@ Fluid_Image* Fluid_Image::find(const char *iname) {
Fluid_Image *ret = new Fluid_Image(iname);
- if (!ret->img->w() || !ret->img->h()) {
+ if (!ret->img || !ret->img->w() || !ret->img->h()) {
delete ret;
ret = 0;
read_error("%s : unrecognized image format", iname);
@@ -196,10 +196,12 @@ void Fluid_Image::decrement() {
Fluid_Image::~Fluid_Image() {
int a;
- for (a = 0;; a++) if (images[a] == this) break;
- numimages--;
- for (; a < numimages; a++) images[a] = images[a+1];
- img->release();
+ if (images) {
+ for (a = 0;; a++) if (images[a] == this) break;
+ numimages--;
+ for (; a < numimages; a++) images[a] = images[a+1];
+ }
+ if (img) img->release();
free((void*)name_);
}
@@ -219,5 +221,5 @@ Fluid_Image *ui_find_image(const char *oldname) {
//
-// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.11 2002/08/09 22:57:00 easysw Exp $".
+// End of "$Id: Fluid_Image.cxx,v 1.7.2.9.2.12 2002/08/16 20:10:21 easysw Exp $".
//
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index d1be42831..d4509797e 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fluid.cxx,v 1.15.2.13.2.30 2002/08/09 22:57:00 easysw Exp $"
+// "$Id: fluid.cxx,v 1.15.2.13.2.31 2002/08/16 20:10:21 easysw Exp $"
//
// FLUID main entry for the Fast Light Tool Kit (FLTK).
//
@@ -762,6 +762,9 @@ int main(int argc,char **argv) {
return 1;
}
const char *c = argv[i];
+
+ fl_register_images();
+
make_main_window();
if (c) set_filename(c);
if (!compile_only) {
@@ -797,5 +800,5 @@ int main(int argc,char **argv) {
}
//
-// End of "$Id: fluid.cxx,v 1.15.2.13.2.30 2002/08/09 22:57:00 easysw Exp $".
+// End of "$Id: fluid.cxx,v 1.15.2.13.2.31 2002/08/16 20:10:21 easysw Exp $".
//