Skip to content

Commit e0c24cd

Browse files
committed
Added a guard to ensure setSinglePassLightBatchSize() is set to a minimum of at least 1.
1 parent fd4f978 commit e0c24cd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

jme3-core/src/main/java/com/jme3/renderer/RenderManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,8 @@ public int getSinglePassLightBatchSize() {
784784
* @param singlePassLightBatchSize the number of lights.
785785
*/
786786
public void setSinglePassLightBatchSize(int singlePassLightBatchSize) {
787-
this.singlePassLightBatchSize = singlePassLightBatchSize;
787+
// Ensure the batch size is no less than 1
788+
this.singlePassLightBatchSize = singlePassLightBatchSize < 1 ? 1 : singlePassLightBatchSize;
788789
}
789790

790791

0 commit comments

Comments
 (0)