From e977551a41fc25eecc15db7d4dbfad04dfa38936 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Sat, 16 Apr 2011 01:15:59 +0200 Subject: [PATCH] Check for hmp before pausing/resuming it --- misc/hmp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/hmp.c b/misc/hmp.c index e5094108d..20c59343d 100644 --- a/misc/hmp.c +++ b/misc/hmp.c @@ -482,12 +482,14 @@ int hmp_play(hmp_file *hmp, int bLoop) void hmp_pause(hmp_file *hmp) { - midiStreamPause(hmp->hmidi); + if (hmp) + midiStreamPause(hmp->hmidi); } void hmp_resume(hmp_file *hmp) { - midiStreamRestart(hmp->hmidi); + if (hmp) + midiStreamRestart(hmp->hmidi); } void hmp_reset()