Ticket #13191: 0001-Ensure-screen-savers-have-an-active-GL-context.patch

File 0001-Ensure-screen-savers-have-an-active-GL-context.patch, 1.9 KB (added by i80and, 7 years ago)
  • src/add-ons/screen_savers/flurry/Flurry.cpp

    From 80d4e5ed2ea2d4a506f86851e41e19daa593dbcd Mon Sep 17 00:00:00 2001
    From: Andrew Aldridge <i80and@foxquill.com>
    Date: Sun, 31 Dec 2017 02:11:15 +0000
    Subject: [PATCH] Ensure screen savers have an active GL context
    
    Fixes a NULL dereference in Flurry, and incorrect viewport
    configuration in Gravity and GLife.
    
    Fixes #13191
    ---
     src/add-ons/screen_savers/flurry/Flurry.cpp       | 4 ++--
     src/add-ons/screen_savers/glife/GLifeView.cpp     | 3 ++-
     src/add-ons/screen_savers/gravity/GravityView.cpp | 3 ++-
     3 files changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/src/add-ons/screen_savers/flurry/Flurry.cpp b/src/add-ons/screen_savers/flurry/Flurry.cpp
    index befa124e39..738caae6e7 100644
    a b FlurryView::InitCheck() const  
    104104void
    105105FlurryView::AttachedToWindow()
    106106{
    107     LockGL();
    108 
    109107    BGLView::AttachedToWindow();
    110108
     109    LockGL();
     110
    111111    MakeTexture();
    112112
    113113    glDisable(GL_DEPTH_TEST);
  • src/add-ons/screen_savers/glife/GLifeView.cpp

    diff --git a/src/add-ons/screen_savers/glife/GLifeView.cpp b/src/add-ons/screen_savers/glife/GLifeView.cpp
    index 4e511e8c8f..d03405a0a7 100644
    a b GLifeView::~GLifeView(void)  
    4545void
    4646GLifeView::AttachedToWindow(void)
    4747{
    48     LockGL();
    4948    BGLView::AttachedToWindow();
     49
     50    LockGL();
    5051   
    5152    glClearDepth(1.0);
    5253    glDepthFunc(GL_LESS);
  • src/add-ons/screen_savers/gravity/GravityView.cpp

    diff --git a/src/add-ons/screen_savers/gravity/GravityView.cpp b/src/add-ons/screen_savers/gravity/GravityView.cpp
    index 1b0dea7669..67d93541a1 100644
    a b GravityView::~GravityView()  
    4242void
    4343GravityView::AttachedToWindow()
    4444{
    45     LockGL();
    4645    BGLView::AttachedToWindow();
    4746
     47    LockGL();
     48
    4849    glClearDepth(1.0f);
    4950
    5051    glEnable(GL_BLEND);