From c826828131acb934697f711a7070fe3a73cf0dfa Mon Sep 17 00:00:00 2001 From: Jason Van Cleave Date: Fri, 12 Oct 2018 00:13:07 -0400 Subject: [PATCH] add setLayer warning --- src/ofxOMXPlayer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ofxOMXPlayer.cpp b/src/ofxOMXPlayer.cpp index 4a77eac..995393a 100755 --- a/src/ofxOMXPlayer.cpp +++ b/src/ofxOMXPlayer.cpp @@ -393,6 +393,11 @@ void ofxOMXPlayer::setAlpha(int alpha) void ofxOMXPlayer::setLayer(int layer) { + if(!isOpen()) + { + ofLogError() << "TOO EARLY TO SET LAYER, Use ofxOMXPlayerSettings.layer to pass in"; + return; + } engine.setLayer(layer); }