Skip to content
Browse files

dont crash if cursor is null

  • Loading branch information...
1 parent 2823d16 commit 75192d5c0c471fdc4cf9b5b0a7cb76deb766a52a @bradallred bradallred committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 gemrb/core/GUI/GameControl.cpp
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

GemRB member

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 :-(

GemRB member

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

GemRB member

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.