diff options
-rw-r--r-- | src/QuickMedia.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index cf2c0a6..14ddba1 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -124,8 +124,9 @@ static void for_each_active_monitor_output(Display *display, std::function<void( const XRRModeInfo *mode_info = get_mode_info(screen_res, crt_info->mode); if(mode_info) callback_func(crt_info, mode_info); - XRRFreeCrtcInfo(crt_info); } + if(crt_info) + XRRFreeCrtcInfo(crt_info); } if(out_info) XRRFreeOutputInfo(out_info); |