mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
add a hack so that loadImage() works in settings() (fixes #299)
This commit is contained in:
@@ -5248,6 +5248,11 @@ public class PApplet implements PConstants {
|
||||
g.awaitAsyncSaveCompletion(filename);
|
||||
}
|
||||
|
||||
// Hack so that calling loadImage() in settings() will work
|
||||
// https://github.com/processing/processing4/issues/299
|
||||
if (surface == null) {
|
||||
return ShimAWT.loadImage(this, filename, extension);
|
||||
}
|
||||
return surface.loadImage(filename, extension);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user