diff options
Diffstat (limited to 'src/Fl_Bitmap.cxx')
| -rw-r--r-- | src/Fl_Bitmap.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index 75cbfdf74..e246f6b92 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.17 2002/08/09 01:09:48 easysw Exp $" +// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.18 2002/10/11 13:54:10 easysw Exp $" // // Bitmap drawing routines for the Fast Light Tool Kit (FLTK). // @@ -407,6 +407,7 @@ void Fl_Bitmap::label(Fl_Menu_Item* m) { Fl_Image *Fl_Bitmap::copy(int W, int H) { // Optimize the simple copy where the width and height are the same... if (W == w() && H == h()) return new Fl_Bitmap(array, w(), h()); + if (W <= 0 || H <= 0) return 0; // OK, need to resize the image data; allocate memory and Fl_Bitmap *new_image; // New RGB image @@ -473,5 +474,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) { // -// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.17 2002/08/09 01:09:48 easysw Exp $". +// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.18 2002/10/11 13:54:10 easysw Exp $". // |
