--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/graphics/GC.java Thu May 27 12:49:31 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/graphics/GC.java Fri Jun 11 13:33:44 2010 +0300
@@ -322,9 +322,12 @@
* that created the drawable</li>
*/
public void dispose() {
+ final Display display = (Display)data.device;
+ if(display.getThread() != Thread.currentThread()) {
+ SWT.error(SWT.ERROR_THREAD_INVALID_ACCESS);
+ }
if (drawable != null && handle != 0) {
if (data.buffered && (drawable instanceof Control)) {
- final Display display = Display.getDefault();
display.syncExec(new Runnable() {
public void run() {
((Control) drawable).redraw();