none
ImageList.LoadImage("filename") Crashes if file not found RRS feed

  • Question

  • This code works:

    imin=ImageList.LoadImage("c:\sb\background.gif")
    iw=ImageList.GetWidthOfImage(imin)
    ih=ImageList.GetHeightOfImage(imin)
    TextWindow.WriteLine("background:"+imin+" Width:"+iw+"height: "+ih)

    However, if the path does not exist,

    imin=ImageList.LoadImage("c:\sb\xbackground.gif") ' NOTE XBACKGROUND.GIF as name
    iw=ImageList.GetWidthOfImage(imin)
    ih=ImageList.GetHeightOfImage(imin)
    TextWindow.WriteLine("background:"+imin+" Width:"+iw+"height: "+ih)

    SB crashes immediately.

    Suggestions?

    Thanks

    Dan
    Friday, September 11, 2009 5:43 PM

Answers

  • This bug is already known and fixed for 0.7.

    See also:
    http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/9ce977d6-86af-4403-81b9-e487c6afac52
    Friday, September 11, 2009 7:06 PM

All replies