Skip to content

Commit

Permalink
Merge pull request #61 from wmz7year/FixesCanvasFrameBUG
Browse files Browse the repository at this point in the history
Fixes CanvasFrame Bug in mac os
  • Loading branch information
saudet committed Nov 29, 2014
2 parents 6f74e7b + ca0895b commit da1d35f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/bytedeco/javacv/CanvasFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ protected void initCanvas(boolean fullScreen, DisplayMode displayMode, double ga
// NullPointerException or IllegalStateException,
// but otherwise seems to work fine.
try {
if (canvas.getWidth() <= 0 || canvas.getHeight() <= 0) {
return;
}
BufferStrategy strategy = canvas.getBufferStrategy();
do {
do {
Expand Down

0 comments on commit da1d35f

Please sign in to comment.