[MPlayer-cvslog] r37416 - trunk/gui/win32/gui.c

ib subversion at mplayerhq.hu
Mon Jun 8 14:11:23 CEST 2015


Author: ib
Date: Mon Jun  8 14:11:22 2015
New Revision: 37416

Log:
Fix segmentation fault.


After the handlemsg() call there may be no longer a gui->activewidget
due to a WM_CAPTURECHANGED.

Modified:
   trunk/gui/win32/gui.c

Modified: trunk/gui/win32/gui.c
==============================================================================
--- trunk/gui/win32/gui.c	Sun Jun  7 14:53:22 2015	(r37415)
+++ trunk/gui/win32/gui.c	Mon Jun  8 14:11:22 2015	(r37416)
@@ -864,7 +864,7 @@ static LRESULT CALLBACK EventProc(HWND h
                 RedrawWindow(hWnd, NULL, NULL, RDW_INVALIDATE);
                 handlemsg(hWnd, gui->activewidget->msg);
 
-                if(gui->activewidget->type == tyRpotmeter)
+                if(gui->activewidget && gui->activewidget->type == tyRpotmeter)
                 {
                     prev_point = appRadian(gui->activewidget, gui->mousewx, gui->mousewy) - gui->activewidget->zeropoint;
                     if(prev_point < 0.0) prev_point += 2 * M_PI;


More information about the MPlayer-cvslog mailing list