Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

dont crash if cursor is null

  • Loading branch information...
commit 75192d5c0c471fdc4cf9b5b0a7cb76deb766a52a 1 parent 2823d16
@bradallred bradallred authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 gemrb/core/GUI/GameControl.cpp
View
5 gemrb/core/GUI/GameControl.cpp
@@ -1610,8 +1610,9 @@ void GameControl::UpdateScrolling() {
}
Sprite2D* cursor = core->GetScrollCursorSprite(cursorFrame, numScrollCursor);
- core->GetVideoDriver()->SetCursor(cursor, VID_CUR_DRAG);
- cursor->release();
+ Video* video = core->GetVideoDriver();
+ video->SetCursor(cursor, VID_CUR_DRAG);
+ video->FreeSprite(cursor);
numScrollCursor = (numScrollCursor+1) % 15;
}

3 comments on commit 75192d5

@wjp
Owner

You really should've squashed this fix into the commit introducing the crash. It's now very hard to do a git bisect inside this branch due to crashes on startup :-(

@bradallred
Owner

i would have, but i only ever experienced the crash on the demo (and even then not on startup). you are crashing on startup?

@wjp
Owner

Yes, when alpha fog of war is enabled, in a range of about 8 commits. Although it may actually have been fixed by the previous commit instead of this one.

Please sign in to comment.
Something went wrong with that request. Please try again.