Browse Source

Do not try to destroy state if _version was Version::None

Since may not be initialized (for Vulkan).

Signed-off-by: Squareys <Squareys@googlemail.com>
pull/202/head
Squareys 10 years ago
parent
commit
01a49422a7
  1. 3
      src/Magnum/Context.cpp

3
src/Magnum/Context.cpp

@ -468,7 +468,10 @@ Context::Context(Context&& other): _version{std::move(other._version)},
}
Context::~Context() {
if(_version != Version::None) {
/* Context was not created */
delete _state;
}
if(currentContext == this) currentContext = nullptr;
}

Loading…
Cancel
Save