Browse Source

Add assertion if FramebufferWidget is destructed with a framebuffer but Window does not exist.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
dcf9cb4df4
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/widget/FramebufferWidget.cpp

+ 4
- 1
src/widget/FramebufferWidget.cpp View File

@@ -38,8 +38,11 @@ FramebufferWidget::FramebufferWidget() {


FramebufferWidget::~FramebufferWidget() {
if (internal->fb)
if (internal->fb) {
// If the framebuffer exists, the Window should exist.
assert(APP->window);
nvgluDeleteFramebuffer(internal->fb);
}
delete internal;
}



Loading…
Cancel
Save