Skip to content

Commit

Permalink
fixed annoying regression where moai couldn't run without a gl context
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Meehan committed May 26, 2016
1 parent dea7a4e commit fb43e29
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/moai-sim/MOAIGfxResourceClerk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
//----------------------------------------------------------------//
void MOAIGfxResourceClerk::DeleteOrDiscardHandle ( ZLGfxHandle*& handle, bool shouldDelete ) {

if ( shouldDelete && MOAIGfxMgr::IsValid ()) {

MOAIGfxMgr::Get ().mResourceMgr.mDeleterStack.Push ( handle );
return;
if ( handle ) {
if ( shouldDelete && MOAIGfxMgr::IsValid ()) {

MOAIGfxMgr::Get ().mResourceMgr.mDeleterStack.Push ( handle );
return;
}
ZLGfx::Discard ( handle );
}
ZLGfx::Discard ( handle );
}

//----------------------------------------------------------------//
Expand Down

0 comments on commit fb43e29

Please sign in to comment.