Bug 561812 - drawBackground from CTabFolderRenderer does not check if image is not disposed
Summary: drawBackground from CTabFolderRenderer does not check if image is not disposed
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-06 06:51 EDT by Hubert Gajewski CLA
Modified: 2020-04-06 07:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hubert Gajewski CLA 2020-04-06 06:51:34 EDT
This is follow up for bug 379791 (SWTException: Graphic is disposed for PlaceholderImpl).

There was missing check to be sure that image is not disposed.

Later a new code was added and the issue described in bug 379791 may occur in different place.

There is:
if (image != null)

Should be:
if (image != null && !image.isDisposed())
Comment 1 Hubert Gajewski CLA 2020-04-06 06:53:25 EDT
Class:
CTabFolderRenderer

Method:
void drawBackground(GC gc, int[] shape, int x, int y, int width, int height, Color defaultBackground, Image image, Color[] colors, int[] percents, boolean vertical)
Comment 2 Lars Vogel CLA 2020-04-06 07:05:35 EDT
Please provide a Gerrit for your proposed change. See https://www.vogella.com/tutorials/EclipsePlatformDevelopment/article.html#exericse-eclipse-user-creation-and-gerrit-server-configuration in case you need help with the Gerrit setup.