Skip to content

Commit 1f94547

Browse files
committed
text: don't blit null surfs
1 parent 1365092 commit 1f94547

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Qor/Text.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ void Text :: redraw()
119119
rect.h = height;
120120
}
121121
rect.y = i * (lineheight + m_LineSpacing*m_pFont->size());
122-
assert(surf);
123-
SDL_BlitSurface(surf, NULL, tmp, &rect);
124-
SDL_FreeSurface(surf);
122+
if(surf){
123+
SDL_BlitSurface(surf, NULL, tmp, &rect);
124+
SDL_FreeSurface(surf);
125+
}
125126
}
126127
assert(tmp);
127128

0 commit comments

Comments
 (0)