bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/27454] Crash when trying to display a non-existent ImageIcon


From: yvan dot norsa at gmail dot com
Subject: [Bug swing/27454] Crash when trying to display a non-existent ImageIcon file
Date: 6 May 2006 11:43:31 -0000


------- Comment #2 from yvan dot norsa at gmail dot com  2006-05-06 11:43 
-------
Created an attachment (id=11388)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11388&action=view)
Small patch fixing the problem

I traced the code, and the problem comes from trying to draw the "error image"
(that is, a blank GtkImage) (so the bug is probably platform-dependent).
I noticed that when not passing width and height to drawImage(), the bug
doesn't occur. That is because in drawPixelsScaled, the width and height
parameters are checked, and if they are <= 0, the function returns.
So my fix is to check also the image size, and to return if it is lower or
equal than 0.


-- 

yvan dot norsa at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #11387|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27454





reply via email to

[Prev in Thread] Current Thread [Next in Thread]